#include<iostream>
using namespace std;
void add(char *a,char *b)
{
int i,j,k=0,carry;
string s;
char *c=(char *)malloc(sizeof(char)*(strlen(a)+2));
memset(c,'0',sizeof(c));
c[strlen(a)+1]='\0';
carry=0;
for(i=strlen(a)-1,j=strlen(b)-1,k=strlen(c)-1;i>=0||j>=0;i--,j--)
{
if(j>=0)
{
int temp=a[i]+b[j]+carry-'0'-'0';
carry=temp/10;
c[k--]=temp%10+'0';
}
else
{
c[k--]=a[i];
}
}
if(carry!=0)
c[k]=carry+'0';
for(i=0;i<strlen(c)&&c[i]=='0';i++);
for(j=i;c[j]!='\0';j++)
cout<<c[j];
free(c);
}
int main()
{
char a[1000],b[1000];
cin>>a;
cin>>b;
if(strlen(a)>strlen(b))
{
add(a,b);
}
else
{
add(b,a);
}
return 0;
}
using namespace std;
void add(char *a,char *b)
{
int i,j,k=0,carry;
string s;
char *c=(char *)malloc(sizeof(char)*(strlen(a)+2));
memset(c,'0',sizeof(c));
c[strlen(a)+1]='\0';
carry=0;
for(i=strlen(a)-1,j=strlen(b)-1,k=strlen(c)-1;i>=0||j>=0;i--,j--)
{
if(j>=0)
{
int temp=a[i]+b[j]+carry-'0'-'0';
carry=temp/10;
c[k--]=temp%10+'0';
}
else
{
c[k--]=a[i];
}
}
if(carry!=0)
c[k]=carry+'0';
for(i=0;i<strlen(c)&&c[i]=='0';i++);
for(j=i;c[j]!='\0';j++)
cout<<c[j];
free(c);
}
int main()
{
char a[1000],b[1000];
cin>>a;
cin>>b;
if(strlen(a)>strlen(b))
{
add(a,b);
}
else
{
add(b,a);
}
return 0;
}