#include <iostream>
#include <vector>
#include <cstdlib>
const int base = 1000*1000*1000;
using namespace std;
vector <int> convert (string s)
{
vector <int> vec1;
for (int i=(int)s.length(); i>0; i-=9)
if (i < 9)
vec1.push_back (atoi (s.substr (0, i).c_str()));
else
vec1.push_back (atoi (s.substr (i-9, 9).c_str()));
return vec1;
}
int main()
{
string a, b;
vector<int> vec1;
vector<int> vec2;
cin >> a >> b;
vec1=convert(a);
vec2=convert(b);
//for (int i=0; i<vec1.size(); i++)
//cout << vec1[i] << " ";
int carry = 0;
for (size_t i=0; i<max(vec1.size(),vec2.size()) || carry; ++i)
{
if (i == vec1.size())
vec1.push_back (0);
vec1[i] += carry + (i < vec2.size() ? vec2[i] : 0);
carry = vec1[i] >= base;
if (carry) vec1[i] -= base;
}
for (int i=vec1.size()-1; i>=0; i--)
cout << vec1[i];
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8dmVjdG9yPgojaW5jbHVkZSA8Y3N0ZGxpYj4KIApjb25zdCBpbnQgYmFzZSA9IDEwMDAqMTAwMCoxMDAwOwogCnVzaW5nIG5hbWVzcGFjZSBzdGQ7CiAKdmVjdG9yIDxpbnQ+IGNvbnZlcnQgKHN0cmluZyBzKQp7CiAgICB2ZWN0b3IgPGludD4gdmVjMTsKIAogICAgZm9yIChpbnQgaT0oaW50KXMubGVuZ3RoKCk7IGk+MDsgaS09OSkKICAgICAgICBpZiAoaSA8IDkpCiAgICAgICAgICAgIHZlYzEucHVzaF9iYWNrIChhdG9pIChzLnN1YnN0ciAoMCwgaSkuY19zdHIoKSkpOwogICAgICAgIGVsc2UKICAgICAgICAgICAgdmVjMS5wdXNoX2JhY2sgKGF0b2kgKHMuc3Vic3RyIChpLTksIDkpLmNfc3RyKCkpKTsKICAgIHJldHVybiB2ZWMxOwp9CiAKaW50IG1haW4oKQp7CiAgICBzdHJpbmcgYSwgYjsKICAgIHZlY3RvcjxpbnQ+IHZlYzE7CiAgICB2ZWN0b3I8aW50PiB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