#一位一位算即可 #先把字符串反转过来,从低位开始算 #计算出结果也翻转一下输出即可 # import sys while True: try: a_str = input()[::-1].strip() b_str = input()[::-1].strip() r_len = max(len(a_str), len(b_str)) result = "" i = 0 last_sum = 0 while i < r_len: a = 0 b = 0 if i < len(a_str): a = int(a_str[i]) if i < len(b_str): b = int(b_str[i]) c = a + b + last_sum if c > 9: last_sum = 1 else: last_sum = 0 result += str(c % 10) i += 1 if last_sum == 1: result += str(last_sum) print(result[::-1]) except: # print(sys.exc_info()) break