#include <iostream>
#include <cmath>

using namespace std;

int main() {
    string a, b;
    int c = 0, brojac = 1;
    cin >> a >> b;

    for(int i = 0; i < min(a.length(), b.length()); i++){
        char kar1 = a[a.length() - i - 1], kar2 = b[b.length() - i - 1];

        if(kar1 > kar2) c += (kar1 - 48) * brojac;
        else if(kar1 < kar2) c += (kar2 - 48) * brojac;
        else{
            c += (kar1 - 48) * brojac;
            brojac *= 10;
            c += (kar1 - 48) * brojac;
        }

        brojac *= 10;
    }

    if(a.length() > b.length()) c += (int)stoi(a)/(int)pow(10, b.length()) * brojac;
    if(a.length() < b.length()) c += (int)stoi(b)/(int)pow(10, a.length()) * brojac;

    cout << c;
}