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.io.BufferedInputStream;
import java.io.IOException;
import java.io.InputStream;

public class MysteriousNumbers {
	
	private static int readInt(InputStream in) throws IOException {
	    int ret = 0;
	    boolean isDigit = false;

	    for (int c = 0; (c = in.read()) != -1; ) {
	    	// Ascii values for char ints 0-9 is [48,57]
	        if (c >= '0' && c <= '9') { 
	            isDigit = true;
	            ret = ret * 10 + c - '0';
	        } else if (isDigit) {
	        	break;
	        }
	    }

	    return ret;
	}

	public static void main(String[] args) throws IOException {
		int n; int t; int total = 0;
		try(BufferedInputStream bis = new BufferedInputStream(System.in)) {
			n = readInt(bis);
			t = readInt(bis);
		}
		if (t == 0) {
			System.out.println(n); System.exit(0);
		}
		
		int power = (int) Math.log10(t);
		for (int i = 0; i < power + 1; i++) {
			total += (t % 10) * (int) (Math.pow(10, power - i)); t /= 10;
		}
		System.out.println(total + n);
		
	}

}