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.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class MagicNumbers {

    public static void main(String[] args) {
        solve();
    }

    public static void solve() {
        BufferedReader br = null;
        InputStreamReader is = null;
        is = new InputStreamReader(System.in);
        br = new BufferedReader(is);
        StringBuffer firstNumber = null;
        StringBuffer secondNumber = null;
        try {
            String inputStr = br.readLine();
            String[] inputArray = inputStr.split(" ");
            firstNumber = new StringBuffer(inputArray[0]);
            secondNumber = new StringBuffer(inputArray[1]);
            secondNumber.reverse();
            int start = 0;
            while (firstNumber.charAt(start) == '0') {
                start++;
                if (start == firstNumber.length())
                    break;
            }
            firstNumber.delete(0, start);
            start = 0;
            while (secondNumber.charAt(start) == '0') {
                start++;
                if (start == secondNumber.length())
                    break;
            }
            secondNumber.delete(0, start);
            System.out.println(getSumm(firstNumber, secondNumber));
        } catch (IOException e) {
            e.printStackTrace();
        }
        if (is != null)
            try {
                is.close();
            } catch (IOException e) {
                e.printStackTrace();
            }
        if (br != null)
            try {
                br.close();
            } catch (IOException e) {
                e.printStackTrace();
            }
    }

    public static String getSumm(StringBuffer firstNum, StringBuffer secondNum) {
        StringBuffer res = new StringBuffer();
        int firstLength = firstNum.length();
        int secondLength = secondNum.length();
        if (firstLength == 0)
            if (secondLength == 0) 
                return "0";
            else 
                return secondNum.toString();
        else
            if (secondLength == 0)
                return firstNum.toString();
        int buffer = 0;
        boolean firstNumberIsLonger = firstLength > secondLength;
        int maxLength = (firstNumberIsLonger) ? firstLength : secondLength;
        for (int index = 0; index < maxLength; index++) {
            int second = (index >= secondLength) ? 0 : secondNum
                    .charAt(secondLength - index - 1) - 48;
            int first = index >= firstLength ? 0 : firstNum.charAt(firstLength
                    - index - 1) - 48;
            Integer sum = first + second + buffer;
            String summ = sum.toString();
            res.append(summ.charAt(summ.length() - 1));
            buffer = sum / 10;
        }
        if (buffer != 0)
            res.append(String.valueOf(buffer));
        res.reverse();
        return res.toString();
    }
}