#include<iostream>
#include<cstring>
using namespace std;
int main()
{
char a[501], b[501], c[501];
for(int i=0; i<=500; i++){a[i]='/';b[i]='/';c[i]='/';}
scanf("%[^\n]",&a);
getchar();
scanf("%[^\n]",&b);
while(true)
{
a2:for(int j=500; j>=0; j--)
{
if(a[j]!='/'&&b[j]!='/')goto a1;
else if(a[j]=='/'&&b[j]!='/')
{
for(int k=500; k>0; k--)a[k]=a[k-1];
a[0]='0';
goto a2;
}
else if(a[j]!='/'&&b[j]=='/')
{
for(int k=500; k>0; k--)b[k]=b[k-1];
b[0]='0';
goto a2;
}
}
}
a1:for(int i=0; i<max(strlen(a), strlen(b)); i++)
{
c[i+1] += (a[i]-48)+(b[i]-48)+1;
for(int j=i+1; j>=1; j--)
{
if(c[j]>'9')
{
c[j]-=10;
c[j-1]++;
if(j-1==0)c[j-1]++;
}
}
}
for(int i=0; i<=500; i++)
{
if(c[i]!='/')cout<<c[i];
}
return 0;
}