#include <iostream>
#include <iomanip>
#include <vector>
#include <cstdlib>
const int base = 1000*1000*1000;
using namespace std;
vector <int> convert (string s)
{
vector <int> vec1;
size_t i = s.length();
for (; i>9; i-=9)
vec1.push_back (atoi (s.substr (i-9, 9).c_str()));
vec1.push_back (atoi (s.substr (0, i).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) ? 1 : 0;
if (carry) vec1[i] -= base;
}
if (vec1.size() > 0) cout << vec1[vec1.size() - 1];
for (int i=vec1.size()-2; i>=0; i--)
cout << setfill('0') << setw(9) << vec1[i];
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8aW9tYW5pcD4KI2luY2x1ZGUgPHZlY3Rvcj4KI2luY2x1ZGUgPGNzdGRsaWI+CiAKY29uc3QgaW50IGJhc2UgPSAxMDAwKjEwMDAqMTAwMDsKIAp1c2luZyBuYW1lc3BhY2Ugc3RkOwogCnZlY3RvciA8aW50PiBjb252ZXJ0IChzdHJpbmcgcykKewogICAgdmVjdG9yIDxpbnQ+IHZlYzE7CiAgICBzaXplX3QgaSA9IHMubGVuZ3RoKCk7CiAgICBmb3IgKDsgaT45OyBpLT05KQogICAgICAgIHZlYzEucHVzaF9iYWNrIChhdG9pIChzLnN1YnN0ciAoaS05LCA5KS5jX3N0cigpKSk7CiAgICB2ZWMxLnB1c2hfYmFjayAoYXRvaSAocy5zdWJzdHIgKDAsIGkpLmNfc3RyKCkpKTsKICAgIHJldHVybiB2ZWMxOwp9CiAKaW50IG1haW4oKQp7CiAgICBzdHJpbmcgYSwgYjsKICAgIHZlY3RvcjxpbnQ+IH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