#include<bits/stdc++.h>
using namespace std;
#define el "\n"
#define ll long long
#define ull unsigned long long
#define se second
#define fi first
#define be begin()
#define en end()
#define Faster cin.tie(0); cout.tie(0); ios_base::sync_with_stdio(0);
int main()
{
Faster;
string a, b; cin >> a >> b;
string s = "";
int du = 0;
if(a.size() == b.size())
{
for(int i = b.size() - 1; i >= 0; i--)
{
int x = a[i] - '0';
int y = b[i] - '0';
s += to_string((x + y + du) % 10);
du = (x + y + du) / 10;
}
}
else
{
string tmp = "";
for(int i = 0; i < a.size() - b.size(); i++)
{
tmp += '0';
}
if(a.size() < b.size()) a = tmp + a;
else b = tmp + b;
for(int i = b.size() - 1; i >= 0; i--)
{
int x = a[i] - '0';
int y = b[i] - '0';
s += to_string((x + y + du) % 10);
du = (x + y + du) / 10;
}
}
if(du != 0) s += to_string(du);
reverse(s.begin(), s.end());
cout << s;
return 0;
}
I2luY2x1ZGU8Yml0cy9zdGRjKysuaD4KdXNpbmcgbmFtZXNwYWNlIHN0ZDsKI2RlZmluZSBlbCAiXG4iCiNkZWZpbmUgbGwgbG9uZyBsb25nCiNkZWZpbmUgdWxsIHVuc2lnbmVkIGxvbmcgbG9uZwojZGVmaW5lIHNlIHNlY29uZAojZGVmaW5lIGZpIGZpcnN0CiNkZWZpbmUgYmUgYmVnaW4oKQojZGVmaW5lIGVuIGVuZCgpCiNkZWZpbmUgRmFzdGVyIGNpbi50aWUoMCk7IGNvdXQudGllKDApOyBpb3NfYmFzZTo6c3luY193aXRoX3N0ZGlvKDApOwoKaW50IG1haW4oKQp7CiAgICBGYXN0ZXI7CiAgICBzdHJpbmcgYSwgYjsgY2luID4+IGEgPj4gYjsKICAgIHN0cmluZyBzID0gIiI7CiAgICBpbnQgZHUgPSAwOwogICAgaWYoYS5zaXplKCkgPT0gYi5zaXplKCkpCiAgICB7CiAgICAgICAgZm9yKGludCBpID0gYi5zaXplKCkgLSAxOyBpID49IDA7IGktLSkKICAgICAgICB7CiAgICAgICAgICAgIGludCB4ID0gYVtpXSAtICcwJzsKICAgICAgICAgICAgaW50IHkgPSBiW2ldIC0gJzAnOwogICAgICAgICAgICBzICs9IHRvX3N0cmluZygoeCArIHkgKyBkdSkgJSAxMCk7CiAgICAgICAgICAgIGR1ID0gKHggKyB5ICsgZHUpIC8gMTA7CiAgICAgICAgfQogICAgfQogICAgZWxzZQogICAgewogICAgICAgIHN0cmluZyB0bXAgPSAiIjsKICAgICAgICBmb3IoaW50IGkgPSAwOyBpIDwgYS5zaXplKCkgLSBiLnNpemUoKTsgaSsrKQogICAgICAgIHsKICAgICAgICAgICAgdG1wICs9ICcwJzsKICAgICAgICB9CiAgICAgICAgaWYoYS5zaXplKCkgPCBiLnNpemUoKSkgYSA9IHRtcCArIGE7CiAgICAgICAgZWxzZSBiID0gdG1wICsgYjsKICAgICAgICBmb3IoaW50IGkgPSBiLnNpemUoKSAtIDE7IGkgPj0gMDsgaS0tKQogICAgICAgIHsKICAgICAgICAgICAgaW50IHggPSBhW2ldIC0gJzAnOwogICAgICAgICAgICBpbnQgeSA9IGJbaV0gLSAnMCc7CiAgICAgICAgICAgIHMgKz0gdG9fc3RyaW5nKCh4ICsgeSArIGR1KSAlIDEwKTsKICAgICAgICAgICAgZHUgPSAoeCArIHkgKyBkdSkgLyAxMDsKICAgICAgICB9CiAgICB9CiAgICBpZihkdSAhPSAwKSBzICs9IHRvX3N0cmluZyhkdSk7CiAgICByZXZlcnNlKHMuYmVnaW4oKSwgcy5lbmQoKSk7CiAgICBjb3V0IDw8IHM7CiAgICByZXR1cm4gMDsKfQo=