Problem: <image>

Input

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

Output

Output a single integer.

Examples

Input

1 1


Output

0


Input

3 7


Output

0


Input

13 10


Output

1

Solution (in PYTHON):

Solution:
## DATA SOURCE (1 for file, 0 for std input)
opt = 0
src = opt and open("input", "r") or None

def gvals(source, format = int, separator = ' '):
	if source:
		a = map(format, source.readline().split(separator))
	else:
		a = map(format, raw_input().split(separator))
	return a

def gval(source, format = int):
	if source:
		a = format(source.readline())
	else:
		a = format(raw_input())
	return a

a, b = gvals(src)
m = 1
while m<=b:
	m*=10
m/=10
while b>0:
	a+=m*(b%10)
	m/=10
	b/=10
print a