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 Solution
{
    public static void main(String args[])
    {
        Scanner sc = new Scanner(System.in);
        String a = sc.next();
        String b = sc.next();
        int l = Math.max(a.length(), b.length());
        int l2 = b.length();
        int x = Integer.parseInt(a);
        int y = Integer.parseInt(b);
        int arx[] = new int[l];
        int ary[] = new int[l];
        for(int i = l-1; i >= 0; i--)
        {
            arx[i] = x%10;
            x /= 10;
        }
        for(int i = l - l2; i < l; i++)
        {
            ary[i] = y%10;
            y /= 10;
        }
        int ar[] = new int[l];
        for(int i = l-1; i >= 0; i--)
        {
            int z = arx[i]+ary[i];
            if(z > 9 && i!=0)
            {
                z%=10;
                arx[i-1]++;
            }
            ar[i] = z;
        }
        long ans = 0;
        for(int i = 0; i < l; i++)
        {
            ans += Math.pow(10, l - i - 1) * (ar[i]);
        }
        System.out.println(ans);
    }
}