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.*;
import java.io.*;

import static java.lang.Math.*;

public class FirstApril2012 {

    void solve () throws IOException {
        int a = in.nextInt();
        int b = in.nextInt();
        if (a == 0 && b == 0){
            out.println(0);
            return;
        }
        int aa[] = new int[100];
        int bb[] = new int[100];
        int cc[] = new int[100];
        int n = 0;
        while (a > 0){
            aa[n++] = a % 10;
            a /= 10;
        }
        int m = 0;
        while (b > 0){
            bb[m++] = b % 10;
            b /= 10;
        }
        int l = 0;
        boolean f = false;
        for (int i = 0, j = m - 1; i < n || j >= 0; i++, j--, l++){
            if (i < n)
                cc[l] += aa[i];
            if (j  >= 0)
                cc[l] += bb[j];
            f = false;
            if (cc[l] >= 10){
                cc[l + 1] += cc[l] / 10;
                f = true;
            }
            cc[l] %= 10;
        }
        if (!f) l--;
        String s = "";
        for (; l >= 0; l--)
            s += (cc[l]);
        out.println(Long.parseLong(s));
    }

    String input = "";
    String output = "";

    FastScanner in;
    PrintWriter out;

    void run () {
        try {
            BufferedReader bf;
            if (input.length() == 0)
                bf = new BufferedReader(new InputStreamReader(
                        System.in));
            else
                bf = new BufferedReader(new FileReader(input));
            in = new FastScanner(bf);

            if (output.length() == 0)
                out = new PrintWriter(System.out);
            else
                out = new PrintWriter(new File(output));

            solve();

            out.close();
        } catch (Exception ex) {
            out.close();
            ex.printStackTrace();
        }
    }

    public static void main (String[] args) {
        new FirstApril2012().run();
    }

    class FastScanner {
        BufferedReader bf;
        StringTokenizer st;

        FastScanner(BufferedReader bf) {
            this.bf = bf;
        }

        String next () throws IOException {
            while (st == null || !st.hasMoreTokens())
                st = new StringTokenizer(bf.readLine());
            return st.nextToken();
        }

        int nextInt () throws IOException {
            return Integer.parseInt(next());
        }

        long nextLong () throws IOException {
            return Long.parseLong(next());
        }

        double nextDouble () throws IOException {
            return Double.parseDouble(next());
        }

        int[] readIntArray (int n) throws IOException {
            int a[] = new int[n];
            for (int i = 0; i < n; i++)
                a[i] = nextInt();
            return a;
        }

        long[] readLongArray (int n) throws IOException {
            long a[] = new long[n];
            for (int i = 0; i < n; i++)
                a[i] = nextLong();
            return a;
        }
    }
}