semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
int main()
{
	char num[2][300]={'0'};
	int a[300]={0};
	scanf("%s",num[0]);
	scanf("%s",num[1]);
	int i,j;
	i=strlen(num[0]);
	j=strlen(num[1]);
	int k;
    if(i<=j){
		for(k=0;k<i;k++){
	   a[k]=(num[0][i-k-1]-'0')+(num[1][j-k-1]-'0');
		}
		for(k=i;k<j;k++){
       a[k]=num[1][j-k-1]-'0';
		}
	}
	else{
		for(k=0;k<j;k++){
			a[k]=(num[0][i-k-1]-'0')+(num[1][j-k-1]-'0');
		}
		for(k=j;k<i;k++){
			a[k]=num[0][i-k-1]-'0';
		}
	}
	for(k=0;k<=251;k++){
		if(a[k]>=10){
			a[k]=a[k]%10;
			a[k+1]=a[k+1]+1;
		}
	}

	for(k=251;k>0;k--){
		if(a[k]!=0) break;
	}
	for(;k>=0;k--){
		printf("%d",a[k]);
	}
}
int main()
{
	const int maxlen=250;
	unsigned an1[maxlen];unsigned an2[maxlen];
	char seline1[maxlen+1];char seline2[maxlen+1];
	cin.getline(seline1,maxlen+1);
	cin.getline(seline2,maxlen+1);
	int nlen1=strlen(seline1);
	int nlen2=strlen(seline2);
	memset(an1,0,sizeof(an1));
	memset(an2,0,sizeof(an2));
	int i,j=0;
	for(i=nlen1-1;i>=0;i--)
	{
		an1[j++]=seline1[i]-'0';
	}
	j=0;
	for(i=nlen2-1;i>=0;i--)
	{
		an2[j++]=seline2[i]-'0';
	}
	for(i=0;i<maxlen;i++)
	{
		an1[i]+=an2[i];
		if(an1[i]>=10)
		{
			an1[i]-=10;
			an1[i+1]++;
		}
	}
	i=maxlen-1;
	if(strlen(seline1)==1&&seline1[0]=='0'&&strlen(seline2)==1&&seline2[0]=='0')
	{
		cout<<0;
	}
	else
	{
		while(an1[i]==0)
		{
			i--;
		}
	    for(;i>=0;i--)
		{
		    cout<<an1[i];
		}
	}
	cout<<endl;
	return 0;
}
void cal(int a[],int b[],int l1,int l2)
{
	for(int i=0;i<l1;++i)
	{
		a[i]+=b[i];
		if(a[i]>=10)
		{
			++a[i+1];
			a[i]-=10;
		}
	}
	
	int j=l1;
	for(;a[j]==0&&j>=0;--j);
	if(j==-1)
		cout<<"0";
	else
	{
	for(int i=j;i>=0;--i)
		cout<<a[i];
	}
}
int main()
{  
	int l1=0,l2=0;
    char a[300],b[300];
	int c[300]={0},d[300]={0};
	cin>>a>>b;
	for(int i=0;a[i]!=0;++i){++l1;}
	for(int i=0;i<l1;++i)
	c[i]=a[l1-1-i]-'0';
	for(int i=0;b[i]!=0;++i){++l2;}
	for(int i=0;i<l2;++i)
	d[i]=b[l2-1-i]-'0';
	if(l1>=l2)
	cal(c,d,l1,l2);
	else
	cal(d,c,l2,l1);
	
	return 0;
}
int main()
{
	int al,bl,j,i,m,n=0;
	char a[255],b[255],ab[255],c=62;
	scanf("%s%c%s",&a,&c,&b);
	al=strlen(a);
	bl=strlen(b);
	if(al>bl)
	{
		m=bl;
		bl=al;
		al=m;
		strcpy(ab,a);
		strcpy(a,b);
		strcpy(b,ab);
	}//b is larger than a
	for(i=al-1;i>=0;i--)
	{
		j=i-al+bl;
		b[j]+=a[i]-48;
	}
	for(i=bl-1;i>=0;i--)
	{
		if(b[i]>57)
		{
			b[i]-=10;
			if(i>0)			
				b[i-1]++;
			else
				n=1;
		}
	}
	if(n)
	{
		printf("1");
		printf("%s\n",b);
	}
	else
	{
		for(i=0;i<bl;i++)
		{
			if(b[i]!='0')
			{
				for(j=i;j<bl;j++)
					printf("%c",b[j]);
				break;
			}
			else
				if(i==0 && bl==1)
					printf("0\n");
		}
	}
	return 0;
}
int main()
{
	char a[260], b[260];
	int s1[260],s2[261],r[260];
	memset(a,'0',260);
	memset(b,'0',260);
	memset(s1,0,sizeof(s1));
	memset(s2,0,sizeof(s2));
	memset(r,0,sizeof(r));
	//cout << r[258] << endl;
	cin >> a >> b ;
	//cout << a <<endl << b;

	int l1 = strlen(a);
	int l2 = strlen(b);

	int max;
	if(l1>l2)
		max = l1;
	else
		max = l2;
	//?????
	int j=0;
	for(int i = l1-1; i>=0; i--,j++)
	{
		s1[j] = a[i]-'0';
		//cout << s1[j];
	}
	j=0;
	for(int i = l2-1; i>=0; i--,j++)
	{
		s2[j] = b[i]-'0';
		//cout << s2[j];
	}

	//??
	int x = 0;
	for(int i = 0; i<260;i++)
	{
		r[i] = r[i]+s1[i]+s2[i];
		//x = i;
		if( r[i] >9)
		{
			r[i] = r[i] -10;
			r[i+1]++;
			//x = i+1;
		}
		if(r[i] !=0)
			x = i;
	}

	//cout << x << endl;
	for(int i = x; i>=0; i--)
		cout << r[i];

	return 0;
}
int main()
{ 	
	int aa[300],bb[300];
	char a[300],b[300];
	cin>>a>>b;
	memset(aa,0,sizeof(aa));
	memset(bb,0,sizeof(bb));
	int i,j=0,k,m=0,n;
	for(i=strlen(a)-1;i>=0;i--)
		aa[j++]=a[i]-'0';
	for(k=strlen(b)-1;k>=0;k--)
		bb[m++]=b[k]-'0';
	for(n=0;n<300;n++)
	{
		aa[n]+=bb[n];
		if(aa[n]>=10)
		{
			aa[n+1]+=1;
			aa[n]-=10;
		}
	}
	
	int s=299;
	while(aa[s]==0&&s>=0)
		s--;
	if(s!=-1)		
	{
		for(int t=s;t>=0;t--)
			cout<<aa[t];
	}
	else
		cout<<'0';
	return 0;
}
main()
{
  char str1[200],str2[200];
  scanf("%s%s",str1,str2);
  int c[200]={0};
  int a,b,l1,l2,i,l=0;
  l1=(int)strlen(str1);
  l2=(int)strlen(str2);
  while(l1>0||l2>0)
  {
     a=l1>0?str1[l1-1]-'0':0;
     b=l2>0?str2[l2-1]-'0':0;
     c[l+1]=(c[l]+a+b)/10;
     c[l]=(c[l]+a+b)%10;
     l1--;
     l2--;
     l++;
}
while(l>0&&c[l]==0)
 l--;
for(i=l;i>=0;i--)
  printf("%d",c[i]);

}
int main()
{
	int i,k,p=0,lena,lenb,a[250],b[250],c[250];
	char s[250],t[250],temp[250];
	
		for(i=0;i<250;i++){
			a[i]=0;b[i]=0;c[i]=0;
		}
		
		scanf("%s%s",s,t);
		lena=strlen(s);
		lenb=strlen(t);
		if(lena<lenb){
			strcpy(temp,s);
			strcpy(s,t);
			strcpy(t,temp);
		}
		lena=strlen(s);
		lenb=strlen(t);
		for(i=lena-1;i>=0;i--)
			a[lena-1-i]=s[i]-48;
		for(i=lenb-1;i>=0;i--)
			b[lenb-1-i]=t[i]-48;
		for(i=0;i<=lena;i++){
			if(a[i]+b[i]>=10){
				c[i]+=a[i]+b[i]-10;
				a[i+1]++;
			}
			else c[i]+=a[i]+b[i];
		}
		
		for(k=i-1;k>=0;k--){
			if(c[k]!=0&&p==0)
				p=1;
			if(p==1)
				printf("%d",c[k]);
		}
		if(p==0) printf("0");
		printf("\n");
		return 0;
}
main()
{
      char a[250],b[250];
      int i,j,k,m0,n0,m,n;
      char *p,*q,*p0;
      scanf("%s%s",a,b);
       m0=strlen(a);
       n0=strlen(b);
      if(m0<n0)   {m=m0;n=n0;q=a;p=b;}
      else {m=n0;n=m0;q=b;p=a;}
      int *c=(int*)malloc((n+1)*sizeof(int));
      c[0]=0;
      for(i=0;i<=m-1;i++)
         {
            c[n-i]=p[n-1-i]+q[m-1-i]-'0'-'0';                
         }
      for(i=0;i<=n-m-1;i++)
         {
             c[i+1]=p[i]-'0';      
         }
      for(i=n;i>=1;i--)
      {
         if(c[i]>=10) 
         {
            c[i]=c[i]-10;
            c[i-1]=c[i-1]+1;             
         } 
      }                
for(i=0;i<n;i++)
     {
        if(c[i]!=0) 
        break;
     }
for(j=i;j<=n;j++)
   printf("%c",c[j]+'0');
}
int max(int a,int b)
 {
     if(a>=b)
        return a;
     else
        return b;
 }
 int main()
 {
     int a1[260],a2[260];
     char a_1[260],a_2[260];
     scanf("%s",a_1);
     scanf("%s",a_2);
     int n,i;
     for(i=0;i<260;i++)
     {
        a1[i]=0;
        a2[i]=0;
     }
     int l1=strlen(a_1);
        n=0;
     for(i=l1-1;i>=0;i--)
        a1[n++]=a_1[i]-'0';
     int l2=strlen(a_2);
        n=0;
     for(i=l2-1;i>=0;i--)
        a2[n++]=a_2[i]-'0';
     for(i=0;i<250;i++)
     {
        a1[i]=a1[i]+a2[i];
        if(a1[i]>=10)
        {
           a1[i]=a1[i]-10;
           a1[i+1]++;
        }
     }
     for(i=max(l1,l2);i>=0;i--)
     {
        if(a1[i]!=0)
        {
           n=i;
           goto t;
        }
        else
        {
           n=i;
        }
        if(n==0)
           goto t;  
     }
     t:for(i=n;i>=0;i--)
          printf("%d",a1[i]);
 }
int cmp(const void * p1, const void * p2)
{
	return 0;
}

char a[255];
char b[255];
int an[255];
int bn[255];
int c[255];

int main()
{
	cin >> a;
	cin >> b;

	memset(an, 0, 255);
	memset(bn, 0, 255);
	memset(c, 0, 255);

	int la = strlen(a);
	int lb = strlen(b);

	for (int i = la -1; i >= 0; i --)
		an[la - 1 - i] = a[i] - '0';
	for (int i = lb -1; i >= 0; i --)
		bn[lb - 1 - i] = b[i] - '0';

	//for (int i = 0; i < la; i ++)
	//	cout << an[i];
	//cout << endl;
	//for (int i = 0; i < lb; i ++)
	//	cout << bn[i];

	int pos = 0;
	for (int i = 0; i < la || i < lb; i ++)
	{
		if (an[i] + bn[i] + c[i] >= 10)
		{
			c[i] = an[i] + bn[i] + c[i] - 10;
			c[i + 1] ++;
		}
		else
		{
			c[i] = an[i] + bn[i] + c[i];
		}
	}
	int i = 254;
	while (i >= 0 && c[i] == 0)
		i --;

	if (i < 0)
		i = 0; 

	while (i >= 0)
	{
		cout << c[i];
		i --;
	}
	cout << endl;
	return 0;
}
main()
{
      int i,m,n;
      char a[250],b[250];
      gets(a); 
      gets(b);
      m=strlen(b);
      n=strlen(a);
      
      
      if(m<=n)
      {
      for(i=n;i>0;i=i-1)
      a[i]=a[i-1]-'0';
      a[0]=0;
      
      for(i=m-1;i>=0;i=i-1)
      b[i]=b[i]-'0';
      
      
      for(i=0;i<m;i=i+1)
      {
      a[n-1-i]=a[n-1-i]+(a[n-i]+b[m-1-i])/10;
      a[n-i]=(a[n-i]+b[m-1-i])%10;
      }
      for(i=m;i<n;i=i+1)
      {
      a[n-1-i]=a[n-1-i]+a[n-i]/10;
      a[n-i]=a[n-i]%10;
      
      }
      
      
      for(i=0;a[i]==0;i=i+1)
      if(i==n+1)
      break;
      if(i==n+1)
      printf("0");
      for(;i<n+1;i=i+1)
      printf("%c",a[i]+'0');
      
      
      
      }
      else
      {
      for(i=m;i>0;i=i-1)
      b[i]=b[i-1]-'0';
      b[0]=0;
      
      for(i=n-1;i>=0;i=i-1)
      a[i]=a[i]-'0';
      
      
      for(i=0;i<n;i=i+1)
      {
      b[m-1-i]=b[m-1-i]+(b[m-i]+a[n-1-i])/10;
      b[m-i]=(b[m-i]+a[n-1-i])%10;
      }
      for(i=n;i<m;i=i+1)
      {
      b[m-1-i]=b[m-1-i]+b[m-i]/10;
      b[m-i]=b[m-i]%10;
      
      }
       
      for(i=0;b[i]==0;i=i+1)
      ;
      
      for(;i<m+1;i=i+1)
      printf("%c",b[i]+'0');
      
      }
   
}
int main()
{
	char a[251]={'0'},b[251]={'0'};
	int a1[251]={0},a2[251]={0},a3[251]={0},a4[251]={0};
    cin.getline(a,251);
	cin.getline(b,251);
	int l1=strlen(a);
	int l2=strlen(b);
	int len;
	if(l1>=l2)len=l1;
	else len=l2;
	int i,j;
	int num;
	for(i=0;i<l1;i++)
		a1[i]=a[l1-i-1]-'0';
	for(j=0;j<l2;j++)
		a2[j]=b[l2-j-1]-'0';
    for(i=0;i<=len;i++)
	{
		if(a1[i]+a2[i]+a3[i]>9)
		a3[i+1]=1;
     	a4[i]=(a1[i]+a2[i]+a3[i])%10;
	}
	if(a3[len]==1)
	num=len;
	else num=len-1;
	for(i=num;i>=0;i--)
		if(a4[i]!=0)
		{
            num=i;
			break;
		}
	  if(i==0)cout<<a4[0];
	  else
	  {
	    for(j=num;j>=0;j--)
			cout<<a4[j];
	  }
	  return 0;
}
struct list
{
   int n;
   char*str;
};
typedef struct list*plist;
plist create()  
{
  plist p1list=(plist)malloc(sizeof(struct list));
  if(p1list!=NULL)
  {
     p1list->str=(char*)malloc(sizeof(int)*maxnum);
     if(p1list->str)
       return p1list;
  }
  return NULL;
}
int l=0;
void plusdzs(plist palist,plist pblist,plist pclist)  
{ 
  int a,b,l1,l2,i;
  l1=(int)strlen(palist->str);
  l2=(int)strlen(pblist->str);
  while(l1>0||l2>0)
  {
     a=l1>0?palist->str[l1-1]-'0':0;
     b=l2>0?pblist->str[l2-1]-'0':0;
     if(l==0)
     {pclist->str[l+1]=(a+b)/10;
     pclist->str[l]=(a+b)%10;}
     else
     {pclist->str[l+1]=(pclist->str[l]+a+b)/10;
     pclist->str[l]=(pclist->str[l]+a+b)%10;}
     l1--;
     l2--;
     l++;
  }
}
void printout(plist pclist,int l)
{ 
  while(l>0&&pclist->str[l]==0)
  l--;
  int i;
  for(i=l;i>=0;i--)
  printf("%d",pclist->str[i]);
}
main()
{
  plist palist=create();
  plist pblist=create();
  plist pclist=create();
  scanf("%s%s",palist->str,pblist->str);
  plusdzs(palist,pblist,pclist);
  printout(pclist,l);

}
main()
{
    int a1[251], b1[251], c[251];
    int i, i1, i2, j1, j2, j3, j4, j5, c1, c2, jinwei, head;
    char a[251], b[251];
    
    scanf("%s", a);
    scanf("%s", b);
    c1 = strlen(a);  c2 = strlen(b);
    a1[0] = b1[0] = 0;
    for(i1=1; i1<=c1; i1++)
        a1[i1] = a[i1-1] - '0';
    for(i2=1; i2<=c2; i2++)
        b1[i2] = b[i2-1] - '0';
    if(c1 >= c2)
    {
        for(i=c1; i>=c1-c2+1; i--)
            b1[i] = b1[i-c1+c2];
        for(j1=c1-c2; j1>=1; j1--)
            b1[j1] = 0;
        jinwei = 0;
        for(j2=c1; j2>=0; j2--)
        {
            c[j2] = a1[j2] + b1[j2] + jinwei;
            jinwei = 0;
            if(c[j2] >= 10)
            {
                c[j2] = c[j2] - 10;
                jinwei++;    
            }        
        } 
        head = 0;
        for(j4=0; j4<=c1; j4++)
            if(c[j4] != 0)
                {
                    head = j4;
                    break; 
                }
        if(head==0 && c[0] == 0)
             printf("0");
        else
        {
            for(j3=head; j3<=c1; j3++)
                printf("%d", c[j3]);
            printf("\n");
        }
    }
    else
    {
        for(i=c2; i>=c2-c1+1; i--)
            a1[i] = a1[i-c2+c1];
        for(j1=c2-c1; j1>=1; j1--)
            a1[j1] = 0;
        jinwei = 0;
        for(j2=c2; j2>=0; j2--)
        {
            c[j2] = a1[j2] + b1[j2] + jinwei;
            jinwei = 0;
            if(c[j2] >= 10)
            {
                c[j2] = c[j2] - 10;
                jinwei++;    
            }        
        } 
        head = 0;
        for(j4=0; j4<=c2; j4++)
            if(c[j4] != 0)
                {
                    head = j4;
                    break; 
                }
        if(head==0 && c[0]==0)
             printf("0");
        else
        {
            for(j3=head; j3<=c2; j3++)
                printf("%d", c[j3]);
            printf("\n");
        }
    }    
              
        return 0;
}
void main()
{char a[251],b[251];
int al,bl,i,k;
scanf("%s %s",a,b);
al=strlen(a);
bl=strlen(b);
for(i=250;i>250-al;i--)
a[i]=a[i-251+al]-48;
for(i=250;i>250-bl;i--)
b[i]=b[i-251+bl]-48;
for(i=0;i<251-al;i++)
a[i]=0;
for(i=0;i<251-bl;i++)
b[i]=0;
k=al>bl?al:bl;
for(i=250;i>250-k;i--)
{
if(a[i]+b[i]>9)
{a[i]=a[i]+b[i]-10;a[i-1]+=1;}
else a[i]=a[i]+b[i];
}
k=251;
for(i=0;i<=250;i++)
if(a[i]!=0){k=i;break;}
if(k<251)
{for(i=k;i<251;i++)
printf("%d",a[i]);
printf("\n");
}
else printf("0\n");
}
int main()
{
	int n,i,j,k;
	char str1[251],str2[251];
	cin.getline(str1,251);
	cin.getline(str2,251);
	int save1[252]={0},save2[250]={0};                 //????????????????????
	int len1=strlen(str1),len2=strlen(str2);
	for(i=len1-1;i>=0;i--)
		save1[len1-1-i]=str1[i]-'0';
	for(i=len2-1;i>=0;i--)
		save2[len2-1-i]=str2[i]-'0';
	int max=(len1>len2)?len1:len2;
	for(i=0;i<max;i++)
	{
		save1[i]+=save2[i];
		if(save1[i]>=10)
		{
			save1[i+1]+=1;
			save1[i]-=10;
		}
	}
	for(i=250;i>=0;i--)
		if(save1[i]!=0)
			break;
	for(j=i;j>=0;j--)
		cout<<save1[j];
	if(i<0)
		cout<<0<<endl;                    //???????
	return 0;
}
void main()
{
  char a[255],b[255],c[255],*p;
  int k=0,m,n,t,i;
  scanf("%s%s",a,b);
  m=strlen(a);
  n=strlen(b);
  if(m>n)
  {
    for(p=b+n-1;p>=b;p--)
		*(p+m-n)=*p;
	for(p=b+m-n-1;p>=b;p--)
		*p='0';
  }
  else 
  {
    for(p=a+m-1;p>=a;p--)
		*(p+n-m)=*p;
	for(p=a+n-m-1;p>=a;p--)
		*p='0';
  }
  t=m>n?m:n;
  for(i=t;i>0;i--)
  {
    *(c+i-1)=*(b+i-1)+*(a+i-1)-'0'+k;
	if(*(c+i-1)>'9')  
	{
		*(c+i-1)-=10;
	    k=1;
	}
	else k=0;
  }
  if(k==1)
  {
    for(i=t;i>0;i--)
		*(c+i)=*(c+i-1);
	*(c+0)='1';
	*(c+t+1)='\0';
  }
  else *(c+t)='\0'; 
  for(p=c;*p=='0';p++)
  {
  }
  printf("%s",p);
  if(m==1&&n==1&&b[0]=='0'&&a[0]=='0')  printf("0");
  printf("\n");
}
int main()
{
	char a[250]={0},b[250]={0},sum[250]={0};
    scanf("%s",a);
	scanf("%s",b);

	int na,i,nb;
	for(i=0;i<250;i++)
	{
		if(a[i]=='\0')
		{
			na=i-1;
			break;
		}
	}

	for(i=0;i<250;i++)
	{
		if(b[i]=='\0')
		{
			nb=i-1;
			break;
		}
	}
	
	int n=na>nb?na:nb;
	if(na<n)
	{
		for(i=0;i<=na;i++)
		{
			a[n-i]=a[na-i];
		}
		for(i=0;i<=n-na-1;i++)
		{
			a[i]=48;
		}
	}

	if(nb<n)
	{
		for(i=0;i<=nb;i++)
		{
			b[n-i]=b[nb-i];
		}
		for(i=0;i<=n-nb-1;i++)
		{
			b[i]=48;
		}
	}

	int t=0;
	for(i=n;i>=0;i--)
	{
		sum[i+1]=a[i]+b[i]+t-48;
		if(sum[i+1]-48>=10)
		{
			sum[i+1]=sum[i+1]-10;
			t=1;
		}
		else t=0;
	}

	
	if(t==1) sum[0]=49;
	else 
	{
		for(i=0;i<=n;i++)
		{
		    sum[i]=sum[i+1];
		}
		sum[n+1]=0;
	}

	if(sum[0]==48 && n>0)
	{

	    int x;
	    for(i=0;i<=n;i++)
		{
		    if(sum[i]==48 && sum[i+1]!=48)
			{
			    x=i;
			    break;
			}
		}

		for(i=0;i<=n-1-x;i++)
		{
			sum[i]=sum[i+x+1];
		}
		sum[n-x]=0;
	}

    printf("%s",sum);

    return 0;

}
void strf(char *str){
	for(int i = 0;i < (int)(strlen(str)/2);i ++){
		char temp = str[i];
		str[i] = str[strlen(str) - 1 - i];
		str[strlen(str) - 1 - i] = temp;
	}
}
int main(){
	char an1[201],an2[201];
	cin >> an1 >> an2;
	strf(an1);strf(an2);
	int anum1[201],anum2[201];
	int ar[202];
	memset(anum1,0,sizeof(anum1));
	memset(anum2,0,sizeof(anum2));
	memset(ar,0,sizeof(ar));
	int l1 = strlen(an1),l2 = strlen(an2),i;
	int length = l1 > l2 ? l1: l2;
	if(length == l1){
		for(i = l2;i < length;i ++){
			an2[i] = '0';
		}
		an2[i] = 0;
	}
	else {
		for(i = l1;i < length;i ++){
		an1[i] = '0';
	}
		an1[i] = 0;
	}
	for(i = 0;i < length;i ++)
	{
		anum1[i] = an1[i] - '0';
		anum2[i] = an2[i] - '0';
		ar[i] += anum1[i] + anum2[i];
	}
	for(i = 0;i < length + 1;i ++){
		if(ar[i] >= 10){
			ar[i] -= 10;
			ar[i + 1] ++;
		}
	}
	for(i = length + 2;ar[i] == 0;i --);
	if(i < 0) cout << '0' << endl;
	else{
		for(;i >= 0;i --){
			cout << ar[i] ;
		}
		cout << endl;
	}

}
int main()
{
	
	char A[250];
	char B[250];
	char C[251]={'1'};
	int i,a=0,b=0,m=0,d=0,e=0,g=0,j;
	gets(A);
	gets(B);
	for(i=0;A[i]!='\0';i++)
	{
		a++;
	}
	for(i=0;B[i]!='\0';i++)
	{
		b++;
	}
	for(i=0;A[i]=='0';i++)
		{
     	d++;
		}
	if(a>=b)
	{
		
		for(i=a-1;i>=a-b;i--)
		{
			B[i]=B[i-a+b];
		}
		for(i=0;i<a-b;i++)
		{
			B[i]='0';
		}
		B[a]='\0';
	    m=0;
		for(i=a-1;i>=0;i--)
		{
			if(A[i]+B[i]+m>105)
			{
				A[i]=A[i]+B[i]+m-58;
				m=1;
			}
			else if(A[i]+B[i]+m<=105)
			{
				A[i]=A[i]+B[i]+m-'0';
				m=0;
			}
		}
		if(d!=0)
		{
			for(j=0;A[j]=='0';j++)
			{
				g++;
			}
			for(j=0;j<a-g;j++)
			{
				A[j]=A[j+g];
			}
			A[a-g]='\0';
	        if(A[0]=='\0')
			{
				A[0]='0';
			}
			puts(A);
		}
	else
	{

			if(m==0)
			{
			puts(A);
			}
	    	if(m==1)
			{
		   strcat(C,A);
			puts(C);
			}
			
		

	}
	}

	if(a<b)
	{
		for(i=0;B[i]=='0';i++)
		{
			e++;
		}
		for(i=b-1;i>=b-a;i--)
		{
			A[i]=A[i-b+a];
		}
		for(i=0;i<b-a;i++)
		{
			A[i]='0';
		}
		A[b]='\0';

	    m=0;
		for(i=b-1;i>=0;i--)
		{
			if(A[i]+B[i]+m>105)
			{
				A[i]=A[i]+B[i]+m-58;
				m=1;
			}
			else if(A[i]+B[i]+m<=105)
			{
				A[i]=A[i]+B[i]+m-'0';
				m=0;
			}
		}
		if(e!=0)
		{
            for(i=0;A[i]=='0';i++)
			{
				g++;
			}
			for(i=0;i<b-g;i++)
			{
				A[i]=A[i+g];
			}
			A[b-g]='\0';
			if(A[0]=='\0')
			{
				A[0]='0';
			}
			puts(A);
		}
	
	
	   else 
	   {

			if(m==0)
			{
			puts(A);
			}
	    	if(m==1)
			{
		   strcat(C,A);
			puts(C);
			}
			
	   }
	   }

 return 0;
}
//============================================================================
// Name        : ?????.cpp
// Author      :
// Version     :
// Copyright   : Your copyright notice
// Description : Hello World in C++, Ansi-style
//============================================================================



int main()
{
	char ta[N]={0},tb[N]={0};
	int a[N]={0},b[N]={0},r[N+1]={0},la,lb,si=0;

	cin.getline(ta,N);
	cin.getline(tb,N);
	la=strlen(ta);
	lb=strlen(tb);

	for(int i=0;i<la;i++)
		a[i]=ta[la-i-1]-'0';
	for(int i=0;i<lb;i++)
		b[i]=tb[lb-i-1]-'0';

	for(int i=0;i<N;i++)
	{
		r[i]+=a[i]+b[i];
		r[i+1]+=r[i]/10;
		r[i]%=10;
	}

	for(int i=N;i>=0;i--)
		if(r[i]!=0)
		{
			si=i;
			break;
		}

	if(si==0)
		cout<<'0'<<endl;
	else
	{
		for(int i=si;i>=0;i--)
			cout<<r[i];
		cout<<endl;
	}

	return 0;
}
void char_revto_int(char*s, int* a, int len)
{
	for(int i=len-1 ; i>=0 ; i--)
		a[len-1-i]=s[i]-'0';
}

void add_int(int* a1, int* a2, int* res)
{
	for(int i=0 ; i<MAX_LEN ; i++)
	{
		res[i]+=a1[i]+a2[i];
		if(res[i] >= 10)
		{
			res[i]-=10;
			res[i+1]++;
		}
	}
}

void output_int(int* a)
{
	int len=MAX_LEN;
	while(!a[len-1])	len--;
	if(len <= 0)
		printf("0");
	for(int i=len-1 ; i>=0 ; i--)
		printf("%d", a[i]);
	printf("\n");
}

int main()
{
	int an1[210]={0}, an2[210]={0}, res[210]={0};
	char s1[210], s2[210];
	scanf("%s", s1);
	scanf("%s", s2);
	char_revto_int(s1, an1, strlen(s1));
	char_revto_int(s2, an2, strlen(s2));
	add_int(an1, an2, res);
	output_int(res);
	return 0;
}
main()
{
  char str1[260],str2[260];
  int A[260]={0},B[260]={0},C[260]={0};
  scanf("%s",str1);
  scanf("%s",str2);
  int i,j=1;
  for(i=strlen(str1)-1;i>=0;i--)
  A[(strlen(str1))-i-1]=str1[i]-'0';
  for(i=strlen(str2)-1;i>=0;i--)
  B[strlen(str2)-i-1]=str2[i]-'0';
  for(i=0;i<260;i++)
  {if (A[i]+B[i]>9) {A[i+1]+=1;
   C[i]=(A[i]+B[i])-10;}
   else C[i]=(A[i]+B[i]);}
   
  for(i=259;i>=0;i--)
  if((j!=1)||(C[i]!=0))
  {j=0;printf("%d",C[i]);}
  if ((C[0]==0)&&(j==1))
  printf("0");
}
int main(int argc, char* argv[])
{
	char s1[251], s2[251];
	int j, k, a, b, c[252]={0};
	scanf("%s %s", s1, s2);
	a = strlen(s1);
	b = strlen(s2);
	int l=0;
	while(a>0||b>0){
		j = (a>0) ? s1[--a]-'0' : 0 ;
		k = (b>0) ? s2[--b]-'0' : 0 ;
		c[l] += j+k;
		c[l+1]=c[l]/10;
		c[l]=c[l]%10;
		l++;
	}
	while(c[l]==0 && l>0)
		l--;
	for(j=l; j>=0; j--)
		printf("%d",c[j]);
	printf("\n");
	return 0;
}
int main()
{
	char A[200],B[200];
	cin>>A>>B;
	int iA[200]={0},iB[200]={0};
	int iC[200]={0};
	char C[200]={0};
	for(int i=0;i<strlen(A);i++)
	iA[i]=(int)A[strlen(A)-1-i]-'0';
	for(int i=0;i<strlen(B);i++)
	iB[i]=(int)B[strlen(B)-1-i]-'0';
	int Lc=max(strlen(A),strlen(B));
	for(int i=0;i<Lc;i++)
	{
	iC[i]+=iA[i]+iB[i];
	iC[i+1]=iC[i]/10;
	iC[i]=iC[i]%10;
	}
	if(iC[Lc]!=0)
	Lc++;
	for(;Lc>=0;Lc--)
	{
		if(iC[Lc-1]!=0)
		break;
	}
	if(Lc==-1)
	cout<<'0';
	else
	{
	for(int i=0;i<Lc;i++)
	C[i]=iC[Lc-1-i]+'0';
	C[Lc]='\0';
	cout<<C<<endl;
	}
	return 0;
}
int main()
{
	char a[251],b[251];               //??????????????
	int an[251],bn[251];              //????????????
	cin>>a>>b;
	int la=strlen(a),lb=strlen(b);
	for(int i=0;i<la;i++)
		an[i]=a[i]-'0';
	for(int i=0;i<lb;i++)
		bn[i]=b[i]-'0';
	if(la>lb)                           //???????????????????????????
	{
	    for(int i=1;i<=lb;i++)
			an[la-i]+=bn[lb-i];
		for(int i=1;i<la;i++)
		{
			an[la-i-1]+=an[la-i]/10;
			an[la-i]=an[la-i]%10;
		}
		int flag=0;
		for(int i=0;i<la;i++)
		{
			if(i==la-1&&flag==0)          //???????????????????
			{
				cout<<a[i];
				break;
			}
			if(an[i]==0&&flag==0)         //????????
				continue;
			flag=1;
			cout<<an[i];
		}
	}
	else                                  //????????????????????
	{
		for(int i=1;i<=la;i++)
			bn[lb-i]+=an[la-i];
		for(int i=1;i<lb;i++)
		{
			bn[lb-i-1]+=bn[lb-i]/10;
			bn[lb-i]=bn[lb-i]%10;
		}
		int flag=0;
		for(int i=0;i<lb;i++)
		{
			if(i==lb-1&&flag==0)
			{
				cout<<b[i];
				break;
			}
			if(bn[i]==0&&flag==0)            
				continue;
			flag=1;
			cout<<bn[i];
		}
	}
	return 0;
}
void main()
{
	char c[1000],d[1000],e[1002],p[1000],q[1000];
	int i,length1,length2,length,mark=0,sign=0;
	gets(c);
	gets(d);
	length1=strlen(c);
	length2=strlen(d);
	for(i=0;i<length1;i++)
		p[i]=c[length1-1-i];
	for(i=0;i<length2;i++)
		q[i]=d[length2-1-i];
	for(i=length1;i<999;i++)
		p[i]='0';
	for(i=length2;i<999;i++)
		q[i]='0';
	if(length1>length2)
		length=length1;
	else
		length=length2;
	for(i=0;i<length+1;i++)
	{
		if(i==0)
		{
			if(p[i]-'0'+q[i]-'0'+mark==0)
			{
				e[0]='0';
				e[1]='\0';
				printf("0");
				break;
			}
		}
		if(i==length)
		{
			if(p[i]-'0'+q[i]-'0'+mark==0)
			{
				e[i]='\0';
				break;
			}
		}
		if(p[i]-'0'+q[i]-'0'+mark>9)
		{
			e[i]=p[i]+q[i]+mark-'0'-10;
			mark=1;
		}
		else
		{
			e[i]=p[i]+q[i]+mark-'0';
			mark=0;
		}
	}
	e[length+1]='\0';
	length=strlen(e);
	for(i=0;i<length;i++)
	{
		if(e[length-1-i]=='0'&&sign==0)
			continue;
		else
		{
			sign=1;
			printf("%c",e[length-1-i]);
		}
	}
	printf("\n");
}