import java.util.*;
public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String a = in.nextLine();
        String b = in.nextLine();
        LinkedList<Integer> stack1 = new LinkedList<Integer>() {{
            for (char c : a.toCharArray()) {
                push(c - '0');
            }
        }};
        LinkedList<Integer> stack2 = new LinkedList<Integer>() {{
            for (char c : b.toCharArray()) {
                push(c - '0');
            }
        }};
        LinkedList<Integer> stack3 = new LinkedList<>();
        int carry = 0;
        while (!stack1.isEmpty() || !stack2.isEmpty()) {
            int x1 = !stack1.isEmpty() ? stack1.pop() : 0;
            int x2 = !stack2.isEmpty() ? stack2.pop() : 0;
            int sum = x1 + x2 + carry;
            carry = sum >= 10 ? 1 : 0;
            stack3.push(sum >= 10 ? sum - 10 : sum);
        }
        if (carry == 1) {
            stack3.push(1);
        }
        stack3.forEach(System.out::print);
    }
}