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 JAVA):

Solution:
import java.util.Scanner;

public class A {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt(), k = sc.nextInt();
		System.out.println(answer(n + "", k + ""));
	}

	private static String answer(String s1, String s2) {
		String answer = "";
		int carry = 0;
		int i = s1.length() - 1, j = 0;
		while (i >= 0 && j < s2.length()) {
			answer = ((s1.charAt(i) - '0') + (s2.charAt(j) - '0') + carry) % 10
					+ answer;
			carry = ((s1.charAt(i) - '0') + (s2.charAt(j) - '0') + carry) / 10;
			i--;
			j++;
		}
		while (i >= 0) {
			answer = ((s1.charAt(i) - '0') + carry) % 10 + answer;
			carry = ((s1.charAt(i) - '0') + carry) / 10;
			i--;
		}
		while (j < s2.length()) {
			answer = ((s2.charAt(j) - '0') + carry) % 10 + answer;
			carry = ((s2.charAt(j) - '0') + carry) / 10;
			j++;
		}
		answer = carry + answer;
		i = 0;
		while (i < answer.length()) {
			if (answer.charAt(i) == '0')
				i++;
			else
				break;
		}
		if (i == answer.length())
			return "0";
		return answer.substring(i);
	}
}