#include <conio.h>
#include <iostream>
#include <math.h>
using namespace std;
int main()
{
const int max=100;
char a[max],b[max],c[max];
gets(a);
gets(b);
for(int i=0;i<strlen(a);i++)//in halgheye for character ha ro tabdil mikone
a[i]-=48;
for(int j=0;j<strlen(b);j++)// moshabehe bala!!!
b[j]-=48;
if(strlen(a)==strlen(b))// in bara mogheie ke tedead argham 2 adad barabarand
{
for(int u=0;u<strlen(a);u++)
c[u]=a[u]+b[u];
for(int m=strlen(a)-1;m>0;m--)
{
if(c[m]>=10)
{
int carry=c[m]/10;
c[m]%=10;
c[m-1]+=carry;
}
}
for(int n=0;n<strlen(a);n++)
printf("%d",c[n]);
getch();
return 0;
}
else if(strlen(a)>strlen(b))
{
char bb[max];
for(int i=0;i<strlen(a)-strlen(b);i++)//in halghe baraye reshteye bb be tedade lazem 0 mizare
{
bb[i]='0';
bb[i]-=48;
}
strcat(bb,b);
for(int i=0;i<strlen(a);i++)//inam ke jam mikone...
c[i]=a[i]+bb[i];
for(int m=strlen(a)-1;m>0;m--)//inam 10 bar yek ha ro hesab mikone...
{
if(c[m]>=10)
{
int carry=c[m]/10;
c[m]%=10;
c[m-1]+=carry;
}
}
for(int y=0;y<strlen(a);y++)//inam chap mikone !!! :D
printf("%d",c[y]);
getch();
return 0;
}
}