#include<iostream>
#include<string>
using namespace std;
string addnum(string a, int i, int c);
int x = 1, y = 1;;
string temp;
int main(void)
{
string a, b;
getline(cin,a);
getline(cin,b);
int an = a.length();
int bn = b.length();
int n,n1;
string out,t;
if (an > bn)
{
n = bn;
n1 = an;
out = a;
t = b;
}
else
{
n = an;
n1 = bn;
out = b;
t = a;
}
int c = 0;
for (int i = 0; i < n; i++)
{
c = int(out[n1 - 1 - i] - '0') + int(t[n - 1 - i] - '0');
out = addnum(out, n1 - 1 - i, c);
x = 1;
y = 1;
n1 = out.size();
}
cout << out;
}
string addnum(string a, int i, int c)
{
if (c < 10)
{
a[i] = char(c + '0');
}
else
{
if (i > 0)
{
a[i] = char(c % 10 + '0');
temp=addnum(a, i - 1, int(a[i - 1] - '0') + 1);
y = 0;
}
else if (i == 0)
{
a[i] = char(c % 10 + '0');
x = 0;
return ("1"+a);
}
}
if (x == 0)
{
return temp;
}
else if (y == 0)
{
return temp;
}
else
{
return a;
}
}