#include <iostream>
#include <string>
#include <algorithm>
#include<stack>
using namespace std;

int main() {
    string s1, s2;
    while (cin >> s1 >> s2) {
        string ans ;
        stack<char> st1;
        stack<char> st2;
        for (char c : s1)
            st1.push(c);
        for (char c : s2)
            st2.push(c);

        int flag = 0;
        while (st1.size() != 0 or st2.size() != 0) {

            int temp = 0;
            if (st1.size() != 0) {
                temp += st1.top() - '0';
                st1.pop();
            }
            if (st2.size() != 0) {
                temp += st2.top() - '0';
                st2.pop();
            }
            ans += (temp + flag) % 10 + '0';
            flag = (temp + flag) / 10;
        }
        if (flag == 1 and st1.size() == 0 and st2.size()  == 0)
            ans += '1';
        
        reverse(ans.begin(), ans.end());
        cout << ans << endl;
    }
    return 0;
}