semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
int main()
{
	int i, c[251], d[251], sum[251], len = 0, temp = 0;
	memset(c, 0, sizeof(c));
	memset(d, 0, sizeof(d));
	memset(sum, 0, sizeof(sum));
	char a[251], b[251];
	cin.getline(a, 251);
	cin.getline(b, 251);
	for (i = 0; i < strlen(a) - 1; i++)
		if (a[i] != '0')
			break;
	temp = i;
	for (i = 0; i < strlen(a) - temp; i++)
		c[i] = a[strlen(a) - 1 - i] - '0';
	len = i;
	i = 0;
	for (i = 0; i < strlen(b) - 1; i++)
		if (b[i] != '0')
			break;
	temp = i;
	for (i = 0; i < strlen(b) - temp; i++)
		d[i] = b[strlen(b) - 1 - i] - '0';
	if (i > len)
		len = i;
	for (i = 0; i < len; i++)
	{
		sum[i] = sum[i] + c[i] + d[i];
		if (sum[i] >= 10)
		{
			sum[i] -= 10;
			sum[i + 1]++;
		}
	}
	if (sum[len] != 0)
		len++;
	for (i = len - 1; i >= 0; i--)
		cout << sum[i];
	return 0;
}
int main()
{
	int q1,q2, t = 0,i,n,l1,l2,l,k,max,j;
	char temp, a[300],b[300],c[300],a_[300], b_[300];
	cin.getline(a,300);
	cin.getline(b,300);
	l1 = strlen(a);
	l2 = strlen(b);
	q1 = 0;
	for(i = 0; i < l1; i++)
	{
		if(a[i] == '0')
			q1++;
		else 
			break;
	}
	l1 = l1 - q1;

	q2 = 0;
	for(i = 0; i < l2; i++)
	{
		if(b[i] == '0')
			q2++;
		else 
			break;
	}
	l2 = l2 - q2;

	max = (l1>l2)?l1:l2;
	l = max;

	j = 0;
	for(i = q1 + l1 - 1; i >= q1 ; i--)
		a_[j++] = a[i];
	a_[j] = '\0';
	
	j = 0;
	for(i = q2 + l2 - 1; i >= q2 ; i--)
		b_[j++] = b[i];
	b_[j] = '\0';
	
	if(l1 < max)
	{
		for(i = l1; i < max; i++)
			a_[i] = '0';
	}
	if(l2 < max)
	{
		for(i = l2; i < max; i++)
			b_[i] = '0';
	}
	
	for (i = 0; i < max; i++)
	{
		k = a_[i] - '0' + b_[i] - '0' + t;
		t = 0;
		if(k > 9)
		{
			k = k - 10;
			t = 1;
		}
		c[i] = k + '0';
		if(i == max - 1 && t == 1)
		{
			l = max + 1;
			c[max] = '1';
		}
	}	
	for(i = l - 1; i >= 0; i--)
		cout << c[i];	
	
	if(l1 == 0 && l2 == 0)
		cout << '0';  
	cout<<'\n'; // ???? 
	
		
		

		return 0;

}
int main()
{
	char a[252],b[252],f[252],g[252];
	int i,c,d,t=0,n=0;
	scanf("%s%s",a,b);
	c=strlen(a);
	d=strlen(b);\
	if(c>d)
	{
		strcpy(f,a);
		strcpy(a,b);
		strcpy(b,f);
		i=c;
		c=d;
		d=i;
	}
	for(i=0;i<c;i++)
	{
		f[i]=(a[c-1-i]-'0'+b[d-1-i]-'0'+t)%10+'0';
		t=(a[c-1-i]-'0'+b[d-1-i]-'0'+t)/10;
	}
	n=c;
	if(c==d&&t==1)
	{
		f[n]='1';
		n+=1;
	}
	if(c<d)
	{
		for(i=n;i<d;i++)
		{
			f[i]=(b[d-1-i]-'0'+t)%10+'0';
			t=(b[d-1-i]-'0'+t)/10;
		}
		n=d;
		if(t==1)
		{
			f[n]='1';
			n+=1;
		}
	}
	if(f[n-1]=='0'&&n!=1)
	{
		for(i=n-2;f[i]=='0';i--);
		n=i+1;
	}
	for(i=0;i<n;i++)
	{
		g[i]=f[n-1-i];
	}
	g[n]='\0';
	printf("%s\n",g);
	return 0;
}
/* Note:Your choice is C IDE */

int change( char *as, int *a)
{int len,i;
	len=(int)strlen(as);
	for(i=0;i<len;i++)
	a[len-i-1]=as[i]-'0';
	return len;} 
 
void bigprint(int *a,int len)
{int k=len-1;
	int i;
	while(a[k]==0&&k>0){k--;}
	for(i=k;i>=0;i--)
	printf("%d",a[i]);}

int add(int *a,int lena,int *b,int lenb,int *c)
{int i;
	int len=(lena>lenb)?lena:lenb;
	for(i=0;i<len;i++)
	{c[i]=0;
		if(i<lena)c[i]+=a[i];
		if(i<lenb)c[i]+=b[i];}
	c[len]=0;
	for(i=0;i<len;i++)
	{if (c[i]>=10){
		c[i+1]+=c[i]/10;
		c[i]%=10;
	}
}return c[len]?(len+1):len;}


void main()
{int a[250],b[250],c[251],lena,lenb,lenc;
    char as[250],bs[250];
    scanf("%s",as);
    scanf("%s",bs);
    lena=change(as,a);
    lenb=change(bs,b);
    lenc=add(a,lena,b,lenb,c);
   bigprint(c,lenc);

}
main()
{
      char a[250],b[250],sum[251];
      int i,j=0,k,l=1,x,y;
      for(i=0;i<250;i++)
           a[i]='0';
      for(i=0;i<250;i++)
           b[i]='0'; 
      for(i=0;i<251;i++)
           sum[i]='0';      
      scanf("%s\n%s",a,b);
      x=strlen(a);
      y=strlen(b);            
      for(i=0;i<x;i++) 
           sum[250-i]=a[x-1-i];   
      for(i=0;i<x;i++)
           a[i]='0';
      for(i=0;i<x;i++)
           a[249-i]=sum[250-i];
      for(i=0;i<251;i++)
           sum[i]='0';       
      for(i=0;i<y;i++) 
           sum[250-i]=b[y-1-i];   
      for(i=0;i<y;i++)
           b[i]='0';
      for(i=0;i<y;i++)
           b[249-i]=sum[250-i];
      for(i=0;i<251;i++)
           sum[i]='0';  
      for(i=0;i<250;i++)      
           sum[250-i]=(a[249-i]-'0')+(b[249-i]-'0');             
      for(i=0;i<250;i++)
      {
           if(sum[250-i]+j>=10)
           {
                 sum[250-i]=sum[250-i]+j-10+'0';
                 j=1;            
           }
           else
           {
                 sum[250-i]=sum[250-i]+j+'0';
                 j=0;
           }             
      }
      if(j==1)
           sum[0]='1';      
      for(i=0;i<251;i++)
      {
           l=l+1;
           if(sum[i]>='1'&&sum[i]<='9')
           {
                 k=i;                 
                 break;                      
           }                    
      }
      if(l==252)      
           printf("%c",sum[0]);
      else     
      {
           for(i=k;i<251;i++)
                printf("%c",sum[i]);
      }      
      
      }
int main()
{
	unsigned a1[260],a2[260];
	char l1[260],l2[260];
	gets(l1);
	cin.getline(l2,260);
	int len1=strlen(l1);
	int len2=strlen(l2);
	memset(a1,0,sizeof(a1));
	memset(a2,0,sizeof(a2));
	int i,j=0;
	for(i=len1-1;i>=0;i--)
		a1[j++]=l1[i]-'0';
	j=0;
	for(i=len2-1;i>=0;i--)
		a2[j++]=l2[i]-'0';
	int max=(len1>len2?len1:len2);
	for(int i=0;i<max;i++)
	{
		a1[i]+=a2[i];
		if(a1[i]>9)
		{
			a1[i]-=10;
			a1[i+1]++;
		}
	}
	i=max;
	while(a1[i]==0&&i>0)i--;
	if(i==0) cout<<0;
	else
	{
		for(;i>=0;i--)
			cout<<a1[i];
	}
	return 0;
}
int main()
{
    char a[300],b[300],c[300];
    int i,aa,bb;
    gets(a);
    gets(b);
    aa=strlen(a),bb=strlen(b);
    if(aa>bb){
                            for(i=aa-1;i>=aa-bb;i--){
                                                                       b[i]=b[i-aa+bb];
                                                                       }
                            for(i=0;i<=aa-bb-1;i++){b[i]='0';}
                            b[aa]=0;
                            } 
    if(aa<bb){
                            for(i=bb-1;i>=bb-aa;i--){
                                                                       a[i]=a[i-bb+aa];
                                                                       }
                            for(i=0;i<=bb-aa-1;i++){a[i]='0';}
                            a[bb]='\0';
                            }
    if(bb>aa)aa=bb;
    //printf("%s\n%s\n", a, b);
    for(i=aa-1;i>=0;i--){
                                if(a[i]+b[i]-96<=9){c[i]=a[i]+b[i]-48;}
                                if(a[i]+b[i]-96>9&&i!=0){c[i]=a[i]+b[i]-58;b[i-1]+=1;}
                                if(a[i]+b[i]-96>9&&i==0){c[i]=a[i]+b[i]-48;}
                                }
    c[aa]='\0';
    char *cc = c;
    if(c[0]-48>9){printf("1");c[0]=c[0]-10;}
    else
    {
        while (*cc == '0') ++cc;
        if (*cc == 0) --cc;
    }
    printf("%s\n", cc);
    //while(1);
    }
int a[300],b[300],la,lb;
void putin(){
memset(a,0,sizeof(a));
memset(b,0,sizeof(b));
char k[300];
cin>>k;
la=strlen(k);
for(int i=0;i<la;i++)a[la-i-1]=k[i]-'0';
while(!a[la]&&la)la--;
la++;
cin>>k;
lb=strlen(k);
for(int i=0;i<lb;i++)b[lb-i-1]=k[i]-'0';
while(!b[lb]&&lb)lb--;
lb++;
}
void add(){
if(lb>la)la=lb;
for(int i=0;i<la;i++)a[i]+=b[i];
for(int i=0;(i<la)||(a[la]>0);i++){a[i+1]+=a[i]/10;a[i]%=10;if(i>la)la=i;}
while(!a[la]&&la)la--;
la++;
}
void pr(){
for(int i=la-1;i>=0;i--)cout<<a[i];cout<<endl;
}
int main(){
putin();
add();
pr();

return 0;
}
int main()
{
    int la,lb,lm,ln,temp=0,i;
    char a[250],b[250];
    int c[251];
    scanf("%s",a);
    scanf("%s",b);
    la=strlen(a);
    lb=strlen(b);
    if(la>lb) {lm=la;ln=lb;}
    else {lm=lb;ln=la;}
    for(i=1;i<=lm;i++)
    {
        if(i>ln&&ln==lb)
        {
            temp=a[la-i]+temp-'0';
            c[lm+1-i]=temp%10;
            if(temp>=10) temp=temp/10;
            else temp=0;
        }
        else if(i>ln&&ln==la)
        {
            temp=b[lb-i]+temp-'0';
            c[lm+1-i]=temp%10;
            if(temp>=10) temp=temp/10;
            else temp=0;
        }
        else
        {
            temp=a[la-i]+b[lb-i]+temp-'0'-'0';
            c[lm+1-i]=temp%10;
            if(temp>=10) temp=temp/10;
            else temp=0;
        }
    }
    c[0]=temp;
    for(i=0;i<=lm;i++)
    {
        if(c[i]!=0) break;
        if(i==lm&&c[i]==0) printf("0");
    }
    for(;i<=lm;i++) printf("%d",c[i]);
    return 0;
}
int str2bigint(char*str,int*a)
{
    int len=(int)strlen(str);
    int i;
    for(i=0;i<len;i++)
    a[len-i-1]=str[i]-'0';
    return len;
}
void print_bigint(int*a,int len)
{
     int k=len-1;
     int i;
     while(a[k]==0&&k>0)
     k--;
     for(i=k;i>=0;i--)
     printf("%d",a[i]);
     printf("\n");
}
int add_bigint(int*a,int alen,int*b,int blen,int*c)
{
    int i;
    int len=(alen>blen)?alen:blen;
    for(i=0;i<len;i++)
    {
                      c[i]=0;
                      if(i<alen)c[i]+=a[i];
                      if(i<blen) c[i]+=b[i];
}
    c[len]=0;
    for(i=0;i<len;i++)
    {
                      if(c[i]>=0)
                      {
                                 c[i+1]+=c[i]/10;
                                 c[i]=c[i]%10;
                      }
}
return c[len]?(len+1):len;
}
int main()
{
      int n;
      char s1[MAX+1],s2[MAX+1];
      int a[MAX+1],b[MAX+1],c[MAX+1];
      int alen,blen,clen;
      scanf("%s %s",s1,s2);
      alen=str2bigint(s1,a);
      blen=str2bigint(s2,b);
      clen=add_bigint(a,alen,b,blen,c);
      print_bigint(c,clen);


return 0;
}
int main()
{
	char a[250],b[250];
	unsigned n[251],m[251];
	memset(n,0,sizeof(n));
	memset(m,0,sizeof(m));
	cin.getline(a,250);
	cin.getline(b,250);
	int l1=strlen(a),l2=strlen(b);
	for(int i=0;i<l1;i++)
		n[i]=a[l1-i-1]-'0';//?????
	for(int j=0;j<l2;j++)
		m[j]=b[l2-j-1]-'0';//?????
	for(int i=0;i<250;i++)
	{
		 n[i]+=m[i];
		if(n[i]>9)
			{
				n[i]-=10;
				n[i+1]++;
		   }
	}
	int k=250;
	while(n[k]==0) k--;
        if(k<0)  cout<<"0";
        else
            {
			for(;k>=0;k--)
		    cout<<n[k];
}
	return 0;
}
int a[300], b[300];
int c[300];

int main()
{
	char aa[300], bb[300];
	cin >> aa >> bb;
	int lena = strlen(aa), lenb = strlen(bb);
	memset(a, 0, 260);
	memset(b, 0, 260);
	for(int i=0; i<lena; i++)
		a[i] = aa[lena-i-1]-'0';
	for(int i=0; i<lenb; i++)
		b[i] = bb[lenb-i-1]-'0';
	int cc = 0;
	memset(c, 0, 300);
	for(int i=0; i<max(lena, lenb)+1; i++)
	{
		c[i] = a[i]+b[i]+cc;
		if(c[i] > 9)
		{
			cc = 1;
			c[i] -= 10;
		}
		else
		{
			cc = 0;
		}
	}
	int lenc = 0;
	for(int i=260; i>=0; i--)
	{
		if(c[i] != 0)
		{
			lenc = i+1;
			break;
		}
	}
	for(int i=lenc-1; i>=0; i--)
		cout << c[i];
	if(lenc == 0)
		cout << '0';
	cout << endl;
}
//By Ethen Yi No.1200011797 Class 5 CCME
int main()
{
    char a[NUM]="",b[NUM]="";
    fgets(a,205,stdin);
    fgets(b,205,stdin);
    int i;
    for(i=0;i<NUM;i++)
    {
        if(a[i]=='\n')
        a[i]='\0';
        if(b[i]=='\n')
        b[i]='\0';
    }
    int na,nb,nresult=0,t;                              //the real lenth of a, b and result
    for(i=NUM-1;i>=0;i--)
        if(a[i]!='\0')
        {
            na=i;break;
        }
    for(i=NUM-1;i>=0;i--)
        if(b[i]!='\0')
        {
            nb=i;break;
        }
    int a1[NUM]={0},b1[NUM]={0};                    //change char into int
    if(na>=nb)
    {
        for(i=0;i<=na;i++)
            a1[i]=a[i]-'0';
        for(i=0;i<=nb;i++)
            b1[i]=b[i]-'0';
    }
    else
    {
        t=nb;
        nb=na;
        na=t;
        for(i=0;i<=na;i++)
            a1[i]=b[i]-'0';
        for(i=0;i<=nb;i++)
            b1[i]=a[i]-'0';
    }
    if(nb!=na)
    {
        for(i=na;i>=na-nb;i--)
            b1[i]=b1[i-na+nb];
        for(i=0;i<na-nb;i++)
            b1[i]=0;
    }
    /*for(i=0;i<=na;i++)
        printf("%d",a1[i]);
    printf("\n");
    for(i=0;i<=na;i++)
        printf("%d",b1[i]);
    printf("\n");*/
    int result[NUM+1]={0};
    for(i=0;i<=na;i++)
    {
        result[NUM-i]+=(a1[na-i]+b1[na-i]);
        t=result[NUM-i]%10;
        result[NUM-1-i]+=(result[NUM-i]-t)/10;
        result[NUM-i]=t;
    }
    while(result[nresult]==0&&nresult<=NUM)
        nresult++;
    //printf("%d",nresult);
    if(nresult==NUM+1)
    printf("0");
    else {
    for(i=nresult;i<NUM+1;i++)
        printf("%d",result[i]);}
    return 0;
}
/*
 * 14.cpp
 *
 *  Created on: 2011-12-2
 *      Author: 11294
 */
int max(int s1,int s2){
	if(s1>s2)return s1;
	else return s2;
}
int main(){
	char a[251]="";
	char b[251]="";
	cin>>a;
	cin>>b;
	int s1=strlen(a);
	int s2=strlen(b);
	int i;
	char c[251]="",d[251]="";
	for(i=0;i<s1;i++){
		c[i]=a[s1-1-i];
	}
	for(i=0;i<s2;i++){
		d[i]=b[s2-1-i];
	}
	char result[252]="";
	int carry=0;
	int smax=max(s1,s2);
	for(i=0;i<=smax;i++){
		if(c[i]==0)c[i]='0';
		if(d[i]==0)d[i]='0';
		result[i]=c[i]+d[i]-48+carry;
		if(result[i]>=58){
			result[i]=result[i]-10;
			carry=1;
		}
		else carry=0;
	}
	for(i=smax;i>=0;i--){
		if(result[i]!='0')break;
	}
	if(i==-1)cout<<0<<endl;
	else {for(;i>=0;i--){
		cout<<result[i];
	}}
	return 0;
}
main()
{
  char  str1[251],str2[251];
  int   str3[252];
  int k,t;
  scanf("%s %s",str1,str2);
  int i=strlen(str1)-1;
  int j=strlen(str2)-1;
  k=0;
  str3[0]=0;
 while(i>=0||j>=0)
 {  if(i>=0&&j>=0)
    t=str1[i]+str2[j]+str3[k]-'0'-'0';
    else {if(i<0) t=str2[j]+str3[k]-'0';
         else t=str1[i]+str3[k]-'0';}
   if(t>9)
    {str3[k]=t-10;
    str3[k+1]=1;}
   else
   {str3[k]=t;
    str3[k+1]=0;}
    j--;
    i--;
    k++;
  }
 for(;k>0;k--)
  if(str3[k]!=0)
   break;
  for(;k>=0;k--)
  printf("%d",str3[k]);


}
const int maxlen=250;
int main()
{
	char num1[maxlen+1];
	char num2[maxlen+1];
	int a[maxlen];
	int b[maxlen];
	int len1,len2;
	cin.getline(num1,maxlen+1);
	cin.getline(num2,maxlen+1);
	len1=strlen(num1);
	len2=strlen(num2);
	int j=0;
	memset(a,0,sizeof(a));
	memset(b,0,sizeof(b));
	for(int i=len1-1;i>=0;i--)
	{
		a[j]=num1[i]-'0';
		j++;
	}
	j=0;
	for(int i=len2-1;i>=0;i--)
	{
		b[j]=num2[i]-'0';
		j++;
	}
	for(int i=0;i<maxlen;i++)
	{
		a[i]+=b[i];
		if(a[i]>=10)
			{
				a[i]-=10;
	            a[i+1]++;
	     	}
	}
   int i=maxlen-1;
while(a[i]==0) i--;
if(i>=0)
for(;i>=0;i--)
	cout<<a[i];
else
	cout<<"0";
cout<<endl;
return 0;
}
int main()
{
	int l1,l2,n,a,b,i,c[260];
	char s1[250],s2[250];
	scanf("%s%s",s1,s2);
	l1=strlen(s1);
	l2=strlen(s2);
	n=0;
	c[0]=0;
	while(l1 ||l2)
	{
		a=(l1>0)?s1[--l1]-48:0;
		b=(l2>0)?s2[--l2]-48:0;
		c[n]+=a+b;
		c[n+1]=c[n]/10;
		c[n++]=c[n]%10;
	}
	while(c[n--]==0 && n>=0);
	for(i=n+1;i>=0;i--)
		printf("%d",c[i]);
	return 0;
}
int main()
{
	unsigned an1[250],an2[250];char s1[251],s2[251];//????????????
	int l1,l2;
	cin >> s1 >> s2;                                //????????
	l1=strlen(s1);l2=strlen(s2);
	memset(an1, 0, sizeof(an1));
	memset(an2, 0,sizeof(an2));
	int i=0,j=0;
	for(i=l1-1;i>=0;i--)                           //?????????
		an1[j++]=s1[i]-'0';
	j=0;
	for(i=l2-1;i>=0;i--)
		an2[j++]=s2[i]-'0';
	for (i = 0; i < 250 ;i++)
	{
		an1[i] += an2[i];
		if(an1[i] >= 10)                          //???
		{
			an1[i]-=10;
			an1[i+1]++;
		}
	}
	i = 249;
	while(an1[i]==0&&i>0) i--; //???????0??
	if(i==0)
		cout << an1[0] << endl;
	else
	{for(;i >= 0; i--)
		cout << an1[i]; //??????
	cout << endl;
	}
	return 0;
}
int main()
{
	int i;
	int lena, lenb;
	char a[251], b[251];
	int na[251], nb[251] = { 0 };
	cin >> a >> b;
	lena = strlen(a);
	lenb = strlen(b);
	for(i = 0; i < lena; ++i)
		na[i] = a[lena - i - 1] - '0';
	for(i = 0; i < lenb; ++i)
		nb[i] = b[lenb - i - 1] - '0';
	for(i = 0; i < lena; ++i)
		nb[i] += na[i];
	for(i = 0; i < 251; ++i)
		if(nb[i] > 9)
		{
			nb[i] -= 10;
			nb[i + 1]++;
		}
	for(i = 250; i >= 0; --i)
		if(nb[i] != 0)
			break;
	if(i == -1)
		cout << 0 << endl;
	else
	{
		for(; i >= 0; --i)
			cout << nb[i];
		cout << endl;
	}
	return 0;
}
int main()
{
	const int max=300;
	char num1[max],num2[max];
	int len1,len2,i,j=0;
	int num11[max]={0},num22[max]={0};
	gets(num1);
	len1=strlen(num1);
	gets(num2);
	len2=strlen(num2);
	if(atoi(num1)==0&&atoi(num2)==0)
	{
		cout<<"0"<<endl;
		return 0;
	}
	else
	{
		for(i=len1-1;i>=0;i--)
			num11[j++]=num1[i]-'0';
		j=0;
		for(i=len2-1;i>=0;i--)
			num22[j++]=num2[i]-'0';
		for(i=0;i<max;i++)
		{
			num11[i]=num11[i]+num22[i];
			if(num11[i]>=10)
			{
				num11[i]=num11[i]-10;
				num11[i+1]++;
			}
		}
		i=max-1;
		while(num11[i]==0)
			i--;
		for(j=i;j>=0;j--)
		{
			cout<<num11[j];
		}
		cout<<endl;
	}
	return 0;
}
int str2bigint(char *str,int *a)
{
	int len=(int)strlen(str);
	int i;
	for(i=0;i<len;i++)
		a[len-i-1]=str[i]-'0';
	return len;
}

void print_bigint(int *a,int len)
{
	int k=len-1;
	int i;
	while(a[k]==0&&k>0)
		k--;
	for(i=k;i>=0;i--)
		printf("%d",a[i]);
	printf("\n");
}

int add_bigint(int *a,int alen,int *b,int blen,int *c)
{
	int i;
	int len;
	len=(alen>blen)?alen:blen;
	for(i=0;i<len;i++)
	{
		c[i]=0;
		if(i<alen)
			c[i]+=a[i];
		if(i<blen)
			c[i]+=b[i];
	}
	c[len]=0;
	for(i=0;i<len;i++)
	{
		if(c[i]>=10)
		{
			c[i+1]+=c[i]/10;
			c[i]=c[i]%10;
		}
	}
	return c[len]?(len+1):len;
}

int main()
{
	char s1[MAX],s2[MAX];
	int a[MAX],b[MAX],c[MAX];
	int alen,blen,clen;
	scanf("%s%s",s1,s2);
	alen=str2bigint(s1,a);
	blen=str2bigint(s2,b);
	clen=add_bigint(a,alen,b,blen,c);
	print_bigint(c,clen);
	return 0;
}
int a[300], b[300], c[300];
int al, bl;
char s[300];

int main() {
	memset(a, 0, sizeof(a));
	memset(b, 0, sizeof(b));
	scanf("%s", s);
	al = strlen(s);
	int i, j = 0;
	for (i = al-1; i >= 0; i--, j++) {
		a[j] = s[i]-'0';
	}
	scanf("%s", s);
	bl = strlen(s);
	j = 0;
	for (i = bl-1; i >= 0; i--, j++) {
		b[j] = s[i]-'0';
	}
	if (bl > al) {
		al = bl;
	}
	/*
	for (i = al; i >= 0; i--)
		printf("%d", b[i]);
	printf("\n");
	*/
	int carry = 0;
	for (i = 0; i <= al+1; i++) {
		c[i] = a[i] + b[i] + carry;
		if (c[i] >= 10) {
			c[i] -= 10;
			carry = 1;
		}
		else
			carry = 0;
	}
	while (c[al] == 0 && al > 0) al --;
	for (i = al; i >= 0; i--)
		printf("%d", c[i]);
	puts("");
	return 0;
}
int main()
{
    char a[251],b[251],c[251];
    int d,x,y,i;
    scanf("%s",a);
    scanf("%s",b);
    x=strlen(a);
    y=strlen(b);
    if(x>=y)             //dui qi, qian jia 0
    {
          for(i=y;i!=-1 ;i--)
              b[i+x-y+1]=b[i];
          for(i=x-y;i!=-1;i--)
              b[i]=48;
          for(i=x;i!=-1;i--)
              a[i+1]=a[i]; 
          a[0]=48;
          d=x;
    }
    //printf("%s,%s",a,b);
	else if(y>x)
    {
          for(i=x;i!=-1 ;i--)
              a[i+y-x+1]=a[i];
          for(i=y-x;i!=-1;i--)
              a[i]=48; 
          for(i=y;i!=-1;i--)
              b[i+1]=b[i]; 
          b[0]=48;
          d=y;              
    }
	c[d+1]='\0';
    for(i=d;i!=-1 ;i--)
    {
          c[i]=a[i]+b[i]-96;
          if(c[i]>=10)
          {
                      c[i]=c[i]-10;
                      a[i-1]++;
          }
          c[i]=c[i]+48;    
    }

    for(;c[0]==48;)
    {     
         for(i=0;;i++)
         {
                      c[i]=c[i+1];
                      if(c[i]=='\0')
                      break;
         }
    }
   	if(c[0]=='\0')
   		c[0]='0';
    printf("%s",c);
    
}
int main(){
    int i,m,n,carry=0;
    char a[252],b[252],A[252],B[252],ADD[252],add[252];
    scanf("%s",a);
    scanf("%s",b);

    while(1){
        if(a[0]!='0')
            break;
        else if(a[0]=='0'&&strlen(a)>1){
            for(i=0;i<strlen(a)-1;i++)
                a[i]=a[i+1];
            a[strlen(a)-1]=0;              
        }else
            break;
    }
    while(1){
        if(b[0]!='0')
            break;
        else if(b[0]=='0'&&strlen(b)>1){
            for(i=0;i<strlen(b)-1;i++)
                b[i]=b[i+1];
            b[strlen(b)-1]=0;
        }else
            break;              
    }
    
    for(i=0;i<strlen(a);i++){
        A[strlen(a)-1-i]=a[i];
        A[strlen(a)]=0;
    }
    for(i=0;i<strlen(b);i++){
        B[strlen(b)-1-i]=b[i];
        B[strlen(b)]=0;
    }
   
    if(strlen(a)<strlen(b)){
        m=strlen(a);
        n=strlen(b);
    }
    else{
        m=strlen(b);
        n=strlen(a);
    }
    
    for(i=0;i<n;i++){
        if(i<m){
            ADD[i]=A[i]+B[i]-'0'+carry;
            if(ADD[i]>='0'&&ADD[i]<='9')
                carry=0;
            else{
                carry=(ADD[i]-'0')/10;
                ADD[i]=(ADD[i]-'0')%10+'0';
            }
        }else{
            if(strlen(A)>strlen(B))
                ADD[i]=A[i]+carry;
            else
                ADD[i]=B[i]+carry;
            if(ADD[i]>='0'&&ADD[i]<='9')
                carry=0;
            else{
                carry=(ADD[i]-'0')/10;
                ADD[i]=(ADD[i]-'0')%10+'0';
            }
        }
    }
    if(carry!=0){
        ADD[n]=carry+'0';
        ADD[n+1]=0;
    }else
        ADD[n]=0;
    
    for(i=0;i<strlen(ADD);i++){
        add[strlen(ADD)-1-i]=ADD[i];
        add[strlen(ADD)]=0;
    }
    
    printf("%s\n",add);
    
    return 0;
}
char a[250],b[250];
int daoxu(char *s, int *x)
{
	int len,i;
	len=strlen(s);
	for(i=0;i<len;i++) x[len-i-1]=s[i]-48;
	for(i=len;i<250;i++) x[i]=0;
	return len;
	}
main()
{
	char a[250],b[250];
	cin>>a>>b;
	int c[250],d[250],m,n,k,i;
	m=daoxu(a,c);
	n=daoxu(b,d);
	for(i=0;i<250;i++)
	{
		c[i]+=d[i];
		if(c[i]>9) 
		{
			c[i+1]++;
			c[i]-=10;
			}
		}
	if(m==1&&n==1&&c[0]+d[0]==0) cout<<"0";
	else
	{
		for(i=249;;i--)
		{
			if(c[i]!=0) 
			{
				k=i;
				break;
				}
			}
		for(i=k;i>=0;i--)
		{
			cout<<c[i];
			}
		}	
	}
int main()
{
	char str1[251], str2[251];
	int i = 0, j = 0, len1, len2, a[251], b[251], c[251], pos = 0;
	memset(a,0,sizeof(a));
    memset(b,0,sizeof(b));
    memset(c,0,sizeof(c));
	cin >> str1 >> str2;
	len1 = strlen(str1);
	len2 = strlen(str2);
	for(i = len1 - 1;i >= 0;i--)
		a[j++] = str1[i] - '0';
	j = 0;
	for(i = len2 - 1;i >= 0;i--)
		b[j++] = str2[i] - '0';
	for(i = 0;i < len1 || i < len2;i++)
	{
		if(a[i] + b[i] >= 10)  
		{
			c[i] = a[i] + b[i] - 10;
			b[i+1] = b[i+1] + 1;
			c[i+1] = 1;
		}
		else c[i] = a[i] + b[i];
	}
	for(i = 250; i >= 0;i--)
		if(c[i] != 0)
		{
			pos = i;
			break;
		}
	for(i = pos;i >= 0;i--)
		cout << c[i];
	return 0;
}
int main()
{
    char s1[1000], s2[1000], str1[1000], str2[1000];
    int i, len1, len2, j, sum[1000]={0}, max, num1[1000]={0}, num2[1000]={0}, hash=0;
    cin.getline(s1,1000);
    cin.getline(s2,1000);
    len1=strlen(s1);
    len2=strlen(s2);
    for( i=0; i<len1; i++ )
    {
        str1[i]=s1[len1-1-i];   
        num1[i]=(int)(str1[i]-'0');            
    }
    for( i=0; i<len2; i++ )
    {
        str2[i]=s2[len2-1-i]; 
        num2[i]=(int)(str2[i]-'0');
    }
    if(len1>=len2)
        max=len1;
    else
        max=len2;
    for( i=0; i<max; i++ )
    {
        sum[i]+=num1[i]+num2[i];
        if(sum[i]>=10)
        {
            sum[i+1]+=1;
            sum[i]-=10;          
        } 
    }
    while(sum[max]) max++;
    while((max>1)&&(!sum[max-1])) max--;
    for( i=max-1; i>=0; i-- )
    {
        cout<<sum[i];
    }
    int x;cin>>x;
    return 0;
}
char a[253],b[253],c[253];
int j;

int main()
{
	void f1(int length,int length2);
	void f2(int length,int length3);
	void f3(int length1,int length2,int length3);
	for (j=0;j<=250;j++)
		c[j]='0';
	cin>>a>>b;
	int length1,length2,length3=250,i;
	length1=strlen(a)-1;
	length2=strlen(b)-1;
	for (i=0;(length1>=0&&length2>=0);i++,length1--,length2--,length3--)
		f3(length1,length2,length3);
	if (length1==-1)
	    for (;length2>=0;length2--,length3--)
	    	f1(length2 ,length3);
	else
		for (;length1>=0;length1--,length3--)
			f2(length1 ,length3);
	int k=0;
	for (i=0 ; i <= 250 ; i++)
		if (c[i]!='0'||( c[i]=='0' && i==250) || k == 1)
		{
			cout<<c[i];
			k=1;
		}

	return 0;
}

void f1(int length,int length3 )
{
	int x,z;
		x=b[length]-'0';
		z=c[length3]-'0';
		if (x+z>=10)
		{
			c[length3]=(x+z)%10+'0';
			c[length3-1]=(x+z)/10+'0';
		}
		else
			c[length3]=x+z+'0';
}

void f2(int length,int length3 )
{
	int x,z;
		x=a[length]-'0';
		z=c[length3]-'0';
		if (x+z>=10)
		{
			c[length3]=(x+z)%10+'0';
			c[length3-1]=(x+z)/10+'0';
		}
		else
			c[length3]=x+z+'0';
}

void f3(int length1 ,int length2 ,int length3)
{
	int x,y,z;
	x=a[length1]-'0';
	y=b[length2]-'0';
	z=c[length3]-'0';
	if (x+y+z>=10)
	{
		c[length3]=(x+y+z)%10+'0';
		c[length3-1]=(x+y+z)/10+'0';
	}
	else
		c[length3]=x+y+z+'0';
}