a = input().strip() b = input().strip() a_rev = a[::-1] b_rev = b[::-1] max_len = max(len(a_rev), len(b_rev)) carry = 0 result = [] for i in range(max_len): digit_a = int(a_rev[i]) if i < len(a_rev) else 0 digit_b = int(b_rev[i]) if i < len(b_rev) else 0 total = digit_a + digit_b + carry carry = total // 10 result.append(total % 10) if carry > 0: result.append(carry) # Reverse to get the correct order and remove any trailing zeros (though sum won't have leading zeros except when 0) result.reverse() # Handle the case where the result is zero (to avoid empty string) sum_str = ''.join(map(str, result)) print(sum_str)