Input

The input contains two integers a1, a2 (0 ≤ ai ≤ 109), separated by a single space.

Output

Output a single integer.

Examples

Input

3 14


Output

44


Input

27 12


Output

48


Input

100 200


Output

102

Source: codeforces | Difficulty: EASY
Tags: Constructive algorithms


Solutions:
from math import floor
(x, y) = input().split()
x = int(x)
y = int(y)
rev = 0
while y > 0:
	a = int(y % 10)
	rev = rev * 10 + a
	y = floor(y / 10)
b = x + rev
print(b)


(a, b) = input().split(' ')
print(int(a) + int(''.join(reversed(list(b)))))


(a, b) = (i for i in input().split())
b = b[::-1]
a = int(a)
b = int(b)
print(a + b)


(n, m) = input().split()
n = int(n)
m = int(m)
res = 0
while m > 0:
	res = res * 10 + m % 10
	m = int(m / 10)
print(res + n)


n = input().split()
c1 = int(n[0])
n1 = ''
for i in range(len(n[1]) - 1, -1, -1):
	n1 += n[1][i]
c2 = int(n1)
print(c1 + c2)


(a, b) = [int(x) for x in input().split()]
print(a + int(str(b)[::-1]))


(n1, n2) = map(int, input().split())
n2 = int(str(n2)[::-1])
print(n1 + n2)


(a, b) = map(int, input().split())
b = str(b)[::-1]
c = a + int(b)
print(c)


num = input().split()
print(int(num[0]) + int(num[1][::-1]))


n = input()
m = n.split()[1]
n = n.split()[0]
(i, j) = (len(n), len(m))
k = max(i, j)
t = min(i, j)
s = 0
for i in range(k):
	if i < t:
		s += (int(n[-i - 1]) + int(m[i])) * 10 ** i
	elif len(n) > len(m):
		s += int(n[-i - 1]) * 10 ** i
	else:
		s += int(m[i]) * 10 ** i
print(s)


(a, b) = input().split()
print(int(b[::-1]) + int(a))


(n, m) = input().split()
r = ''
for i in m:
	r = i + r
print(int(n) + int(r))


c = input().split()
a = c[0]
b = c[1]
b2 = ''
for i in range(1, len(b) + 1):
	b2 += b[-i]
print(int(a) + int(b2))


(a, b) = map(int, input().split())
bx = 0
while b > 0:
	bx = bx * 10 + b % 10
	b //= 10
print(a + bx)


(a, b) = map(int, input().split())
b = str(b)
c = ''
for i in b:
	c = i + c
print(a + int(c))


(a1, a2) = map(str, input().split())
a = int(a1) + int(a2[::-1])
print(a)


s = input().split()
(a, b) = (s[0], s[1])
print(int(a) + int(b[::-1]))


(n1, n2) = map(int, input().split())
rev = 0
while n2 > 0:
	rem = n2 % 10
	rev = rev * 10 + rem
	n2 = n2 // 10
print(f'{n1 + rev}')


(n, m) = map(str, input().split())
x = list(m)
x.reverse()
s = ''
for el in x:
	s += el
print(int(n) + int(s))


(a, b) = map(int, input().split())
a = str(a)
b = str(b)
b = b[::-1]
b.strip('0')
print(int(a) + int(b))


(a, b) = input().split()
z = int(b[::-1])
x = int(a)
print(z + x)


(n, m) = map(int, input().split())
print(int(str(m)[::-1]) + n)


ls = list(map(str, input().split()))
ls[1] = ls[1][::-1]
print(int(ls[0]) + int(ls[1]))


s = [int(n) for n in input().split()]

def f(x):
	s = [int(n) for n in str(x)]
	m = 0
	for n in range(len(s)):
		m += s[n] * 10 ** n
	return m
print(s[0] + f(s[1]))


(a1, a2) = input().split()
print(int(a1) + int(a2[::-1]))


import sys
input = lambda : sys.stdin.readline().rstrip()
(a, b) = map(int, input().split())
print(a + int(str(b)[::-1]))


(n, m) = input().split()
s = ''
n = int(n)
for i in range(len(m) - 1, -1, -1):
	s += m[i]
s = int(s)
print(n + s)


(a, b) = map(int, input().split())
rev = 0
while b > 0:
	rev = 10 * rev + b % 10
	b = b // 10
print(a + rev)


(a, b) = input().split()
l = max(map(len, [a, b]))
(a, b) = (a.zfill(l), b[::-1].zfill(l))
print(int(a) + int(b))


(a, s) = map(int, input().split())
s = list(str(s))
s.reverse()
for i in range(len(s)):
	a += 10 ** i * int(s[-1 - i])
print(a)


(x, y) = input().split()
x = int(x)
y = int(y[::-1])
print(x + y)


try:
	(a, b) = map(int, input().split())
	print(a + int(str(b)[::-1]))
except EOFError as e:
	print(e)


def mysterious_numbers(x, y):
	result = 0
	z = int(y)
	while z > 0:
		result = result * 10 + z % 10
		z = z // 10
	return int(x) + result
(x, y) = input().split()
print(mysterious_numbers(x, y))


(a, b) = input().split()
while len(a) != len(b):
	if len(a) < len(b):
		a = '0' + a
	if len(b) < len(a):
		b = b + '0'
c = ''
f = 1
d = 0
for i in range(len(a)):
	e = int(b[i]) + int(a[len(a) - i - 1])
	d = d + e * f
	f = f * 10
print(d)


(a, b) = input('').split()
c = b[::-1]
d = int(c)
e = int(a)
print(d + e)


(n, m) = map(int, input().split())
x = str(m)
y = int(x[::-1])
print(n + y)


a = input()
a = a.split()
d = []
for i in a:
	d.append(str(i))
b = d[0]
c = d[1][::-1]
b = int(b)
c = int(c)
e = str(b + c)
print(e)


(a, b) = input().split()
b = str.join('', reversed(b))
print(int(a) + int(b))


(x, y) = map(int, input().split())
print(x + int(str(y)[::-1]))


import sys
import string
from collections import Counter, defaultdict
from math import fsum, sqrt, gcd, ceil, factorial
from operator import *
from itertools import accumulate
inf = float('inf')
flush = lambda : sys.stdout.flush
comb = lambda x, y: factorial(x) // factorial(y) // factorial(x - y)
ip = lambda : input()
ii = lambda : int(input())
r = lambda : map(int, input().split())
rr = lambda : list(r())
(a, b) = ip().split()
print(int(a) + int(b[::-1]))


(a, b) = map(str, input().split())
num = ''.join(reversed(b))
ans = int(a) + int(num)
print(ans)


(A, B) = map(int, input().split())
B = str(B)
C = ''
for i in range(len(B) - 1, -1, -1):
	C += B[i]
C = int(C)
print(A + C)


(a, b) = map(int, input().split())
c = b
k = m = 0
while c > 0:
	c = c // 10
	k += 1
for i in range(k, 0, -1):
	m += b % 10 * 10 ** (i - 1)
	b = b // 10
print(a + m)


a = input()
print(int(a.split()[0]) + int(a.split()[1][::-1]))


(n, m) = input().split()
m = str.join('', reversed(m))
print(int(n) + int(m))


(n, m) = input().split()
ln = len(n)
lm = len(m)
if ln > lm:
	m = m + '0' * (ln - lm)
else:
	n = '0' * (lm - ln) + n
ans = ['0'] * (len(n) + 1)
y1 = 0
for i in range(len(n)):
	x = str(int(m[i]) + int(n[len(n) - i - 1]) + int(ans[len(n) - i]))
	if len(x) == 1:
		ans[len(n) - i] = x
	else:
		ans[len(n) - i] = x[1]
		ans[len(n) - i - 1] = str(int(x[0]) + int(ans[len(n) - i - 1]))
a = ''
for i in range(len(ans)):
	a += ans[i]
print(int(a))


(a, b) = input().split()
(a, b) = (int(a), int(b))
temp = 0
digit = 0
while b:
	digit = b % 10
	temp = temp * 10 + digit
	b //= 10
b = temp
print(a + b)


(a1, a2) = map(int, input().split())
print(a1 + int(''.join(list(str(a2))[::-1])))


(a, b) = input().split()
n = max(len(a), len(b))
a = ('0' * n + a)[-n:]
b = (b + '0' * n)[:n]
ans = []
carry = 0
for (j, i) in zip(b, reversed(a)):
	x = int(i) + int(j) + carry
	carry = x // 10
	ans.append(str(x % 10))
ans.append(str(carry))
print(int(''.join(reversed(ans))))


from sys import stdout
from sys import stdin

def get():
	return stdin.readline().strip()

def getf(sp=' '):
	return [int(i) for i in get().split(sp)]

def put(a, end='\n'):
	stdout.write(str(a) + end)

def putf(a, sep=' ', end='\n'):
	stdout.write(sep.join([str(i) for i in a]) + end)

def main():
	(a, b) = getf()
	put(a + int(str(b)[::-1]))
main()


(a, b) = map(int, input().split())
c = str(b)
for i in range(len(c) - 1, -1, -1):
	a += 10 ** i * int(c[i])
print(a)


import math
import re
from fractions import Fraction
from collections import Counter

class Task:
	(a, b) = (0, 0)
	answer = 0

	def __init__(self):
		(self.a, self.b) = [x for x in input().split()]

	def solve(self):
		(a, b) = (self.a, self.b)
		self.answer = int(a) + int(b[::-1])

	def printAnswer(self):
		print(self.answer)
task = Task()
task.solve()
task.printAnswer()


(a, b) = map(int, input().split())
print('%d' % (a + int(str(b)[::-1])))


s = input().split()
s[1] = s[1][::-1]
print(int(s[0]) + int(s[1]))


import math
import sys
input = sys.stdin.readline

def inp():
	return int(input())

def inlt():
	return list(map(int, input().split()))

def reverse_number(n):
	r = 0
	while n > 0:
		r *= 10
		r += n % 10
		n //= 10
	return r
(m, s) = inlt()
print(m + reverse_number(s))


from math import gcd, sqrt, ceil

def ii():
	return int(input())

def mi():
	return map(int, input().split())

def li():
	return list(mi())

def si():
	return input()

def main():
	(a, b) = mi()
	s = list(str(b))
	s.reverse()
	s = ''.join(s)
	print(a + int(s))
main()


(a, b) = [int(x) for x in input().split()]
c = 0
while b > 0:
	c = c * 10 + b % 10
	b //= 10
print(a + c)


def readln():
	return tuple(map(int, input().split()))
(a, b) = readln()
print(a + int(''.join(reversed(list(str(b))))))


(x, y) = map(int, input().split())
dig0 = 0
y2 = 0
x2 = 0
orig_y = y
if 0 <= x <= 10 ** 9 and 0 <= y <= 10 ** 9:
	while y > 0:
		dig = y % 10
		y = y // 10
		dig0 += dig
		if dig0 > 0:
			y2 = y2 * 10 + dig
		else:
			pass
	print(x + y2)


(a, b) = [int(x) for x in input().split()]
ch2 = str(b)
res = a + int(''.join(reversed(list(ch2))))
print(res)


(a, b) = [int(x) for x in input().split()]
new = str(b)
rev = ''
for i in range(len(new)):
	rev += new[len(new) - i - 1]
print(int(rev) + a)


__author__ = 'MARI'

def reverse(a):
	b = 0
	while a > 0:
		b *= 10
		b += a % 10
		a //= 10
	return b

def main():
	(a, b) = [int(x) for x in input().split()]
	print(a + reverse(b))
import sys
argv = sys.argv
main()


(a, b) = map(str, input().split())
n = int(a)
k = int(b[::-1])
print(n + k)


(a, b) = (int(t) for t in input().split(' '))
b = int(str(b)[::-1])
print(a + b)


import os, sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
try:
	(sys.stdin, sys.stdout) = (open('in.txt', 'r'), open('out.txt', 'w'))
except:
	pass
ii1 = lambda : int(sys.stdin.readline().strip())
is1 = lambda : sys.stdin.readline().strip()
iia = lambda : list(map(int, sys.stdin.readline().strip().split()))
isa = lambda : sys.stdin.readline().strip().split()
mod = int(1000000000.0 + 7)
from collections import defaultdict as dd
from collections import deque as dq
from collections import Counter
(n, m) = iia()
print(int(str(m)[::-1]) + n)


(x, y) = map(str, input().split())

def mysterSum(a=int(x), b=int(y[::-1])):
	mysum = a + b
	return mysum
out = mysterSum(a=int(x), b=int(y[::-1]))
print(out)


import math
import itertools
import collections

def getdict(n):
	d = {}
	if type(n) is list:
		for i in n:
			if i in d:
				d[i] += 1
			else:
				d[i] = 1
	else:
		for i in range(n):
			t = ii()
			if t in d:
				d[t] += 1
			else:
				d[t] = 1
	return d

def cdiv(n, k):
	return n // k + (n % k != 0)

def ii():
	return int(input())

def mi():
	return map(int, input().split())

def li():
	return list(map(int, input().split()))

def lcm(a, b):
	return abs(a * b) // math.gcd(a, b)

def sumc(t):
	s = 0
	while t > 0:
		s += t % 10
		t //= 10
	return s
a = li()
sa1 = list(str(a[1]))
sa1.reverse()
print(a[0] + int(''.join(sa1)))


from sys import stdin, gettrace
if not gettrace():

	def input():
		return next(stdin)[:-1]

def main():
	(n, m) = input().split()
	m = ''.join(list(m)[::-1])
	print(int(n) + int(m))
main()


(a, b) = map(int, input().split())
b = list(str(b))
b.reverse()
b = int(''.join(b))
print(a + b)


import math
(a, b) = map(int, input().split())
c = str(b)
d = ''.join(reversed(c))
print(a + int(d))


[N1, N2] = map(int, input().split())
N2 = int(str(N2)[::-1])
print(N1 + N2)


(n, k) = input().split()
print(int(n) + int(''.join(reversed(k))))


(a, b) = map(int, input().split(' '))
newb = 0
while b > 0:
	newb *= 10
	newb += b % 10
	b //= 10
print(a + newb)


(n, m) = input().split()
print(int(n) + int(m[::-1]))