semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
int main()
{
	char a[260];
	char b[260];
	char tmp[260];
	int i, j;
	for (i = 0;i < 260;i++)
	{
		a[i] = '0';
		b[i] = '0';
	}
	cin >> tmp;
	int lena = strlen(tmp);
	for (j = 0;j < lena;j++)
	{
		if (tmp[j] != '0')
			break;
	}
	for (i = j;i < lena;i++)
		a[i-j] = tmp[lena - (i-j) - 1];
	cin >> tmp;
	lena -= j;
	int lenb = strlen(tmp);
	for (j = 0;j < lenb;j++)
		if (tmp[j] != '0')
			break;
	for (i = j;i < lenb;i++)
		b[i-j] = tmp[lenb - (i-j) - 1];
	lenb -= j;


	int c = 0;
	int len = lena > lenb ? lena : lenb;
	for (i = 0;i < 260;i++)
	{
		if (a[i] - '0' + b[i] - '0' + c > 9)
		{
			a[i] = a[i] - '0' + b[i] - '0' + c - 10 + '0';
			c = 1;
		}
		else
		{
			a[i] = a[i] - '0' + b[i] - '0' + c + '0';
			c = 0;
		}
	}

	if (lena == 0 && lenb == 0)
		cout << 0;
	else
	{
	if (a[len] > '0')
		cout << a[len];
	for (i = len-1;i>= 0;i--)
		cout << a[i];
	}
	cout << endl;
	return 0;
}
int main()
{
	char A[250],B[250],C[250],D[250],E[250];
	int i,j,a,b,c;
	gets(A);
	gets(B);
	a=strlen(A);
	b=strlen(B);
	for (i=a-1,j=0;i>=0;i--,j++)
	{
		C[j]=A[i];
	}
	C[j]=0;
	for (i=b-1,j=0;i>=0;i--,j++)
	{
		D[j]=B[i];
	}
	D[j]=0;
	if (a>b)
	{
		for (i=0;i<b;i++)
		{
			if (E[i]==1)
			E[i]=C[i]+D[i]-47;
			else 
			E[i]=C[i]+D[i]-48;
			if (E[i]>57)
			{
				E[i]-=10;
				E[i+1]=1;
			}
		}		
		for (i=b;i<a;i++)
		{	if (E[i]==1)
			E[i]=C[i]+1;
			else 
			E[i]=C[i];
			if (E[i]>57)
			{	E[i]-=10;
			E[i+1]=1;
			}
		}
		if (E[i]==1)
		{	E[i]=49;
		E[i+1]=0;
		}
		else E[i]=0;
		c=0;
		for (i=strlen(E)-1;i>=0;i--)
		{	
			if (E[i]!=48 )
			{
			printf("%c",E[i]);
			c=1;
			}
			if (E[i]==48 && c==1)
			printf("%c",E[i]);
		}
		if (c==0)
			printf("0");
		printf("\n");
	}
	else  
	{
		for (i=0;i<a;i++)
		{
			if (E[i]==1)
			E[i]=C[i]+D[i]-47;
			else 
			E[i]=C[i]+D[i]-48;
			if (E[i]>57)
			{
				E[i]-=10;
				E[i+1]=1;
			}
		}
		for (i=a;i<b;i++)
		{	if (E[i]==1)
			E[i]=D[i]+1;
			else 
			E[i]=D[i];
			if (E[i]>57)
			{	E[i]-=10;
			E[i+1]=1;
			}
		}
		if (E[i]==1)
		{ E[i]=49;
		E[i+1]=0;
		}
		else E[i]=0;
		c=0;
		for (i=strlen(E)-1;i>=0;i--)
		{
			if (E[i]!=48 )
			{
			printf("%c",E[i]);
			c=1;
			}
			if (E[i]==48 && c==1)
			printf("%c",E[i]);
			
		}
		if (c==0)
			printf("0");
		printf("\n");
	}


	return 0;
}
int main()
{
    char a[255],b[255],c[255];
	int i,d[255],k=0;
	gets(a);
	gets(b);
	for(i=0;i<255;i++)
		d[i]=0;
	if(strlen(a)>strlen(b))
	{
		strcpy(c,a);
		strcpy(a,b);
		strcpy(b,c);
	}
	for(i=strlen(a)-1;i>=0;i--)
	{
          d[strlen(a)-1-i]=((int)(a[i]+b[i-strlen(a)+strlen(b)]-'0'-'0')+k)%10;
		  k=((int)(a[i]+b[i-strlen(a)+strlen(b)]-'0'-'0')+k)/10;
	}
	for(i=strlen(b)-strlen(a)-1;i>=0;i--)
	{
		d[strlen(b)-1-i]=((int)(b[i]-'0')+k)%10;
		k=((int)(b[i]-'0')+k)/10;
	}
	d[strlen(b)]=k;
	k=0;
	for(i=strlen(b);i>=0;i--)
	{
		if(d[i]!=0)
			break;
        k++;
	}
	for(i=strlen(b)-k;i>=0;i--)
			printf("%d",d[i]);
	if(k==(strlen(b)+1))
		printf("0");
	return 0;
}
int main()
{
	char a[251]={'\0'},b[251]={'\0'},c,temp[251],add[252]={'\0'};
	int i,j,k,la,lb;

	scanf("%s",a);
	scanf("%s",b);

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

	add[0]='0';

	if(la>lb)
	{
		k=la;
		la=lb;
		lb=k;
		strcpy(temp,a);
		strcpy(a,b);
		strcpy(b,temp);
	}
   

	j=lb-1;
    i=la-1;
	
	for(i=la-1;i>=0;i--)
	{

		
		c=a[i]+b[j]-48;
		if(c<='9')
		{	
			add[j+1]=add[j+1]+c;

	        if(add[j+1]>'9')
			{add[j+1]=add[j+1]-10;
           	if(j==0)
            add[j]='1';
			else
				add[j]='1'-48;}}

	
		else
		{
			add[j+1]=add[j+1]+c-10;
			if(j==0)
            add[j]='1';
			else
				add[j]='1'-48;
		}
		j--;
	}

	k=j;
if(lb>la)
	for(j=k;j>=0;j--)

	{	add[j+1]=add[j+1]+b[j];
	if(add[j+1]>'9')
	{add[j+1]=add[j+1]-10;
	if(j==0)
            add[j]='1';
			else
				add[j]='1'-48;}}
	


for(i=0;i<lb+1;i++)
    if(add[i]!='0')
		break;
	if(i!=lb+1)
	{
	     k=i;
		for(i=k;i<lb+1;i++)
			printf("%c",add[i]);
	}
	else
		printf("0");
	
			return 0;
}
int main()
{
	char a[205];
	char b[205];
	char t[205];
	char c[205];
	char *t1,*t2,*t3;
	cin>>a>>b;
	int l1 = strlen(a);
	int l2 = strlen(b);
	if(l1<l2)
	{
		int i,j,carry=0;
		for(i=0;i<205;i++) c[i]='\0';
		t3 = &c[l2];
		t2 = &b[l2-1];
		t1 = &a[l1-1];
		while(t1>=a)
		{
			*t3 =  (*t1 + *t2 - '0' - '0' + carry) % 10 + '0' ;
			carry =( *t1 + *t2 - '0' - '0' + carry)/10;
			t3--;
			t2--;
			t1--;
		}
		while(t2>=b)
		{
			* t3 = (*t2 -'0' + carry)%10 + '0';
			carry =  (*t2 -'0' + carry)/10 ;
			t3--;
			t2--;
		}
		*t3 = carry +'0';
		if(*t3 == '0')
			t3++;
		cout<<t3<<endl;
	}
	else
	{
		int i,j,carry=0;
		for(i=0;i<205;i++) c[i]='\0';
		t3 = &c[l1];
		t2 = &b[l2-1];
		t1 = &a[l1-1];
		while(t2>=b)
		{
			*t3 =  (*t1 + *t2 - '0' - '0' + carry) % 10 + '0' ;
			carry =( *t1 + *t2 - '0' - '0' + carry)/10;
			t3--;
			t2--;
			t1--;
		}
		while(t1>=a)
		{
			* t3 = (*t1 -'0' + carry)%10 + '0';
			carry =  (*t1 -'0' + carry)/10 ;
			t3--;
			t1--;
		}
		*t3 = carry +'0';
		while(*t3 == '0')
			t3++;
		if(*t3=='\0')
			cout<<0<<endl;
		else
		cout<<t3<<endl;
	}
	return 0;
}
char plus1[SIZE + 10] = {'\0'};
char plus2[SIZE + 10] = {'\0'};
int p1[SIZE + 10] = {0};
int p2[SIZE + 10] = {0};
int result[SIZE + 10] = {0};
int main ()
{
	int i = 0, end = -1;
	cin >> plus1 >> plus2;
	for(i = strlen(plus1) - 1; i >=0; i --)
		p1[strlen(plus1) - 1 - i] = plus1[i] - '0';
	for(i = strlen(plus2) - 1; i >=0; i --)
		p2[strlen(plus2) - 1 - i] = plus2[i] - '0';
	for(i = 0; i < SIZE + 5; i ++)
	{
		result[i] = result[i] + p1[i] + p2[i];
		if(result[i] >= 10)
		{
			result[i + 1] ++;
			result[i] = result[i] - 10;
		}
		if(result[i])
			end = i;
	}
	if(end == -1)
		cout << 0 << endl;
	else
		for(i = end; i >= 0; i --)
			cout << result[i];
	return 0;
}
int main()
{
	int i,j,n,afirst,bfirst;
	char a[max], b[max],c[max],A[max],B[max];
	for(i=0;i<max;i++)
	{
		a[i]='0';
		b[i]='0';
		c[i]='0';
		A[i]='0';
		B[i]='0';
	}
	
	scanf("%s\n%s",a,b);
	for (i=0;i<max;i++)
	{
		if(a[i]=='\0')
		
			break;
		
	}
	afirst=i-1;
	for (i=0;i<max;i++)
	{
		if(b[i]=='\0')
			break;
	}
	bfirst=i-1;
	if(afirst>bfirst)
		n=afirst;
	else
		n=bfirst;
	for(i=afirst,j=0;i>=0;i--,j++)
	{
		A[n+1-j]=a[i];
	}
	for(i=bfirst,j=0;i>=0;i--,j++)
	{
		B[n+1-j]=b[i];
	}
	for(i=n+1;i>=1;i--)
	{
		c[i]+=A[i]+B[i]-'0'-'0';
		if(c[i]-'0'>=10)
		{
			c[i]-=10;
		    c[i-1]++;
		}
	}
	for (i=0;c[i]=='0'&&i<=n+1;i++);
	if(i==n+2)
		printf("0");
	else 
	{
			for(;i<=n+1;i++)
		{
			printf("%c",c[i]);
		}
	}
	return 0;
}
int main()
{
	int l1,l2,n,a[255]={0},b[255],k=0,f=0,i,j,x=0,y=0;
	char s1[255],s2[255];
	scanf("%s%s",s1,s2);
	l1=strlen(s1);
	l2=strlen(s2);
	for(i=0;i<l1;i++){
		if(s1[i]!='0')
			y=1;
	}
	for(i=0;i<l2;i++){
		if(s2[i]!='0')
			y=1;
	}
	if(y==0){
		printf("%d",0);
		return 0;
	}
	else{
	if(l1>l2){
		for(i=1;i<=l1;i++){
			if(l2-i>=0){
				b[l1-i]=(s1[l1-i]-48+s2[l2-i]-48+a[l1-i])%10;
				a[l1-i-1]=(s1[l1-i]-48+s2[l2-i]-48+a[l1-i])/10;
			}
			else{
				b[l1-i]=(s1[l1-i]-48+a[l1-i])%10;
				a[l1-i-1]=(s1[l1-i]-48+a[l1-i])/10;
			}
		}
		if(a[0]!=0){
			printf("%d",a[0]);
			x=1;
		}
		for(i=0;i<l1;i++){
			if(b[i]!=0||x==1){
				printf("%d",b[i]);
				x=1;
			}
		}
		x=0;
	}
	else if(l1==l2){
		for(i=1;i<=l1;i++){
			if(l2-i>=0){
				b[l1-i]=(s1[l1-i]-48+s2[l2-i]-48+a[l1-i])%10;
				a[l1-i-1]=(s1[l1-i]-48+s2[l2-i]-48+a[l1-i])/10;
			}
			else{
				b[l1-i]=(s1[l1-i]-48+a[l1-i])%10;
				a[l1-i-1]=(s1[l1-i]-48+a[l1-i])/10;
			}
		}
		if(a[0]!=0){
			printf("%d",a[0]);
			x=1;
		}
		for(i=0;i<l1;i++){
			if(b[i]!=0||x==1){
			printf("%d",b[i]);
			x=1;
			}
		}
		x=0;
	}
	else{
		for(i=1;i<=l2;i++){
			if(l1-i>=0){
				b[l2-i]=(s1[l1-i]-48+s2[l2-i]-48+a[l2-i])%10;
				a[l2-i-1]=(s1[l1-i]-48+s2[l2-i]-48+a[l2-i])/10;
			}
			else{
				b[l2-i]=(s2[l2-i]-48+a[l2-i])%10;
				a[l2-i-1]=(s2[l2-i]-48+a[l2-i])/10;
			}
		}
		if(a[0]!=0){
			printf("%d",a[0]);
			x=1;
		}
		for(i=0;i<l2;i++){
			if(b[i]!=0||x==1){
			printf("%d",b[i]);
			x=1;
			}
		}
		x=0;
	}
}
	return 0;
}
int an1[MAXLEN+10];
int an2[MAXLEN+10];
char sline1[MAXLEN+10];
char sline2[MAXLEN+10];
int ADD(int nMAXLEN, int* a1, int* a2)
{
    int i=0, j=0;
    int highest;
    for(i=0; i<=nMAXLEN; i++)
    {
        a1[i]+=a2[i];
        if(a1[i]>=10)
        {
            a1[i]-=10;
            a1[i+1]++;
        }
        if(a1[i]>0)
            highest=i;
    }
    return highest;
}
int main()
{
    int i=0, j=0;
    memset(an1, 0, sizeof(an1));
    memset(an2, 0, sizeof(an2));
    //scanf("%s",sline1);
    //scanf("%s",sline2);
    cin>>sline1>>sline2;
    int len1 = strlen(sline1);
    for(j=0, i = len1 - 1; i>=0; i--)
    {
        an1[j++] = sline1[i] - '0';
    }
    int len2 = strlen(sline2);
    for(j=0, i = len2 - 1; i>=0; i--)
    {
        an2[j++] = sline2[i] - '0';
    }
    int k = ADD(MAXLEN, an1, an2);
    for(i=k; i>=0; i--)
    {
        //printf("%d",an1[i]);
        cout<<an1[i];
    }
    return 0;
}
char a[300];
char b[300];
char c[300];


int main(){
	cin >> a;
	cin >> b;
	int la ,lb;
	la = strlen(a);
	lb = strlen(b);
	if(la > lb){
		strcpy(c,a);
		strcpy(a,b);
		strcpy(b,c);
	}
	la = strlen(a);
	lb = strlen(b);
	for(int i = 0 ; i < 300 ; i++)
		c[i] = 0;
	c[0] = '0';
	for(int i = lb-1 ; i >= 0 ; i--){
		if(i >= lb - la){
			c[i+1] += b[i] + (a[i+la-lb] - '0');			
		}
		else{
			c[i+1] += b[i];
		}
		if(c[i+1] >'9'){
			c[i+1] -= 10;
			c[i] += 1;
		}
	}
	int i = 0;
	while(c[i] == '0')
		i++;
	if(i <= lb){
		for(; i <= lb; i++)
			cout << c[i];
	}
	else
		cout <<0;
	cout << endl;
	return 0;
}
void main()
{
	char s1[250], s2[250];
	int a[250], b[250], c[250];
	int len1, len2, len, i;
	
	for ( i = 0; i < 250; i++)
	{
		a[i] = 0;
		b[i] = 0;
		c[i] = 0;
	}

	scanf ( "%s", s1);
	scanf ( "%s", s2);

	len1 = strlen (s1);
	len2 = strlen (s2);

	if ( len1 < len2)
		len = len2;
	else
		len = len1;

	for ( i = 0; i < len1; i++)
	{
		a[i] = s1[len1 - 1 - i] - '0';
	}
	
	for ( i = 0; i < len2; i++)
	{
		b[i] = s2[len2 -1 -i] - '0';
	}

	for ( i = 0; i < len; i++)
	{
		a[i] += b[i];
		if ( a[i] >= 10)
		{
			a[i+1]++;
			a[i] -= 10;
		}
	}
	if ( a[len] > 0)
		len++;

	while ( a[len - 1] == 0 && len >1)
		len--;


	for ( i = len; i > 0; i--)
	{
		printf ("%d", a[i-1]);
	}
}
/***********************************************************************
     
     ??:?????
     ??: ???????? 
     ??:
         ?1????????????????????????????????????????????????????
         ?2???????????????????????????????????????
         ?3?????????? 
     ????? 2012.03.09    ??? 
     ***********************************************************************/


struct stu
{
  int num;
    struct stu *next;   
};
main()
{
    int i,j,n,y,q,m,t;
    n=1000;   // ??printf("?????????????????\n");  scanf("%d ",&n)
   // printf("????????????????\n");
    struct stu *head,*head0,*p,*p1,*p2,*p0,*p3,*p4,*p5,*p6,*p7,*p8;
    char a[n],b[n];
     
    gets(a);
    i=strlen(a);
    gets(b);
    j=strlen(b);
      //i?j??????? a?b??? 
    if(i>j){t=i;}       
    else {t=j;}      
   // ??????????????+1??????????e[t]???   ??????a?b???? 
    t=t+1;
    int e[t];
    
    p1=p2=(struct stu*)malloc(LEN); //????p1??? ?p2????? 
    p1->num=a[i-1]-'0';
    head=p1;
    p3=p4=(struct stu*)malloc(LEN); //????p3??? ?p4????? 
    p3->num=b[j-1]-'0';
    head0=p3; 
    i=i-1;j=j-1;         //?while???? 
    p=head;            //????P?P0. 
    p0=head0; 
    
    //????????P5   
    int  c1=0,c2;       //C2????????C1??C2???C1???0     
    c2=p->num+p0->num;
    p5=p6=(struct stu*)malloc(LEN);//?????? 
     y=c2+c1/10;      //Y??????? 
    p5->num=y%10;    //???????????P5??? 
    c1=c2; 
    p7=p5; 
    
     while(i>0||j>0)     //????????????? 
    {    
        p2=p1;
        p1=(struct stu*)malloc(LEN);
        p1->num=(i>0)?a[--i]-'0':0;      //??????0 
        p2->next=p1;
        
        p4=p3;
        p3=(struct stu*)malloc(LEN);
        p3->num=(j>0)?b[--j]-'0':0;        //??????0      
        p4->next=p3;
         
        p0=p0->next; 
        p=p->next; 
      
        c2=p->num+p0->num; 
        
        p6=p5;
        p5=(struct stu*)malloc(LEN);
        y=c2+y/10;                   //Y??????? 
        p5->num=y%10;    //???????????P5??? 
        c1=c2;
        p6->next=p5;
    }
     p1->next=NULL;          
     p3->next=NULL;
     p6=p5;
     p5=(struct stu*)malloc(LEN);
     p5->num=y/10;        //???????  
     p6->next=p5;            
     p5->next=NULL; 
     
     
      //?????????  
     p=head;
     p0=head0;
     p8=p7;
    for(m=t-1;p8!=NULL;m--)
    {
     e[m]=p8->num;
      p8=p8->next; 
    }
    m=0;
    if(p5->num==0&&t==2)   //?????????0? 
    {m=1;}                 //?????0 
    else                   //?????????????0?
    {
     while(e[m]==0&&m<t)    //???????0   
    {m++;}
    }
    for(y=m;y<t;y++)        //????
    {
      printf("%d",e[y]);              
    }        
getchar();
getchar();
getchar(); 
}
main(){
	char a[251],b[251],c[252]={0};
	int alen,blen,clen,i,x;
	scanf("%s%s",a,b);
	alen=strlen(a);blen=strlen(b);
	for(i=1;i<alen+1;i++)a[251-i]=a[alen-i]-'0';
	for(i=1;i<blen+1;i++)b[251-i]=b[blen-i]-'0';
	for(i=250-alen;i>=0;i--)a[i]=0;
	for(i=250-blen;i>=0;i--)b[i]=0;
	for(i=250;i>=0;i--){
		c[i+1]+=a[i]+b[i];
		if(c[i+1]>9){
			c[i+1]-=10;c[i]++;
		}
	}	
	while(i<252&&c[i]<=0)i++;if(i==252)printf("0");
	for(;i<252;i++)printf("%d",c[i]);
	return 0;
}
int main()
{
    int n,i,m,k,p,q;
    int c[251];
    char a[250],b[250],d;
    gets(a);
    p=strlen(a);
    if(p<250)
    {for(i=0;(d=a[i])!='\0';i++)
     m=i+1;}
     else m=250;
    
    gets(b);
    q=strlen(b);
    if(q<250)
    {for(i=0;(d=b[i])!='\0';i++)
     n=i+1;}
     else n=250;
    
    for(i=m-1;i>=0;i--)
      a[250-m+i]=a[i];
    for(i=n-1;i>=0;i--)
      b[250-n+i]=b[i];
       
       
    for(i=0;i<250-m;i++)
    a[i]=0;
    for(i=250-m;i<250;i++)
    a[i]=a[i]-48;
    
    for(i=0;i<250-n;i++)
    b[i]=0;
    for(i=250-n;i<250;i++)
    b[i]=b[i]-48;
      
      for(i=249;i>=1;i--)
      {if(a[i]+b[i]>9)
       {c[i+1]=a[i]+b[i]-10;
        a[i-1]=a[i-1]+1;}
       else c[i+1]=a[i]+b[i];}
      
      if(a[0]+b[0]>9)
        {c[1]=a[0]+b[0]-10;
         c[0]=1;}
      else 
        {c[1]=a[0]+b[0];
         c[0]=0;}
     i=0;
     do
     {i=i+1;}
     while(c[i]==0);
      k=i;
     
     if(k<251)
     {for(i=k;i<251;i++)
      {c[i]=c[i]+48;
       printf("%c",c[i]);}}
     else
     printf("0");
      
      
      return 0;
}
void add(char a[],char b[],int x1,int x2,char c[])
{
	int i,j,k;
	for(i=x1-1,j=x2-1;j>=0;i--,j--)
	{
		k=a[i]-48+b[j]-48;
		if(k+c[i+1]>9)
		{
			c[i+1]=c[i+1]+k-10;
			c[i]=c[i]+1;
		}
        else c[i+1]=c[i+1]+k;
	}
	for(;i>=0;i--) 
	{
		if(c[i+1]+a[i]-48<10)
		c[i+1]=c[i+1]+a[i]-48;
		else
		{
			c[i+1]=c[i+1]+a[i+1]-58;
			c[i]=c[i]+1;
		}
	}
}
void main()
{	int i,j=0,x1,x2,m;
    char a[250],b[250],c[251]={"\0"};
	scanf("%s%s",a,b);
	x1=strlen(a);
	x2=strlen(b);
	if(x1>=x2) m=x1;
	else m=x2;
	if(x1>=x2) add(a,b,x1,x2,c);
	else add(b,a,x2,x1,c);
	for(i=0;i<m;i++)
	{
		if(j==0)
		{
		   if(c[i]!=0)
		   {
		    printf("%d",c[i]);
		    j++;
		   }
		}
		else printf("%d",c[i]);
	}
	printf("%d\n",c[m]);
}
main()
{
      char a[250],b[250],c[252];
      scanf("%s",a);
      scanf("%s",b);
      int L1=strlen(a),L2=strlen(b),j=0;                                        /*??????????*/
      for(int i=0;;i++)
      {
           if(L1-i-1<0&&L2-i-1<0)                                               /*??????*/
           {    if(j==1)
                {    c[i]=49;
                     c[i+1]='\0';}
                else
                c[i]='\0';
                break;}
           if(L1-i-1<0) c[i]=b[L2-i-1]+j-48;                                                 /*j??????*/
           else if(L2-i-1<0) c[i]=a[L1-i-1]+j-48;
           else c[i]=a[L1-i-1]+b[L2-i-1]+j-96;
           if(c[i]>=10) 
           {    j=1;
                c[i]=c[i]-10;}
           else j=0;        
           c[i]=c[i]+48;
      }
      int L=strlen(c),m=0;
      for(int i=L-1;;i--)                                                       /*?????0???*/
      {
      if(c[i]==48) m=m+1;
      else break;
      }     
      if(c[0]==48&&L==1) printf("0");
      for(int i=L-m-1;i>=0;i--)
      {
      printf("%c",c[i]);  
      }
      }
int main()
{
    char a1[251],b1[251],a[251],b[251],str[252];
    int i,prime=0;
    cin>>a1>>b1;
    memset(a,'\0',sizeof(a));
    memset(b,'\0',sizeof(b));
    int l,l1=strlen(a1),l2=strlen(b1);
    if(l1==1 && a1[0]=='0' && l2==1 && b1[0]=='0') cout<<0;
    for(i=0;i<l1;i++)
    {
    	a[l1-i-1]=a1[i];
    }
    for(i=0;i<l2;i++)
    {
    	b[l2-i-1]=b1[i];
    }
    for(i=strlen(a)-1;;i--)
    {
    	if(a[i]!='0') break;
    	else { a[i]='\0'; l1--; }
    }
    for(i=strlen(b)-1;;i--)
    {
        if(b[i]!='0') break;
        else { b[i]='\0'; l2--; }
    }
    if(l1>l2) l=l1;
        else l=l2;
    for(i=l1;i<l;i++)
    	a[i]='0';
    for(i=l2;i<l;i++)
    	b[i]='0';
    for(i=0;i<l;i++)
    {
    	int t=(int)(a[i]-'0')+(int)(b[i]-'0')+prime;
    	if(t>9) { t=t-10; prime=1; }
    	else prime=0;
    	str[i]=(char)(t+'0');
    }
    if(prime) { str[i]='1'; l++; }
    for(i=l-1;i>=0;i--)
    	cout<<str[i];
	return 0;
}
/*
 * Name:homework.cpp
 *  Created on: 2012-11-24
 *  Author: Meng Li
 *  Function: ?????
 */



void sum(char a[], char b[]);                     //????

int main(){                                       //????????????
	char a[250], b[250];
	cin >> a >> b;
	sum(a,b);
	return 0;
}

void sum(char a[], char b[]){                    //???????
	int length1=0, length2=0, i, count=0;
	int temp=0;
	char c[250];
	length1=strlen(a);                          //????????
	length2=strlen(b);
	for (i=0;;i++){
		if (i<length1&&i<length2){                         //??????????????????4????????temp?????count??????
			c[i]=a[length1-1-i]-'0'+b[length2-1-i]+temp;
			if (c[i]>'9'){
				c[i]=c[i]-10;
				temp=1;
			}
			else
				temp=0;
			count++;
		}
		else if (i>=length1&&i<length2){
			c[i]=b[length2-i-1]+temp;
			if (c[i]>'9'){
				c[i]=c[i]-10;
				temp=1;
			}
			else
				temp=0;
			count++;
		}
		else if (i<length1&&i>=length2){
			c[i]=a[length1-i-1]+temp;
			if (c[i]>'9'){
				c[i]=c[i]-10;
				temp=1;
			}
			else
				temp=0;
			count++;
		}
		else if (i>=length1&&i>=length2)
			if (temp==1){
				c[i]=temp+'0';
				count++;
				temp=0;
			}
			else                //???????
				break;
	}
	int flag=0;
	for (i=count-1;i>=0;i--)                    //?????????????,??????
		if (c[i]=='0'&&i!=0&&flag==0)
			continue;
		else{
			cout << c[i];
			flag=1;
		}
}
int main(void)
{
    char numA[MAXN];
    char numB[MAXN];
    char ans[MAXN];
    char c;
    int maxLen;
    int i,aLen,bLen,cx,ax,j,flag;
    scanf("%s",numA);
    scanf("%s",numB);
    aLen = strlen(numA);
    bLen = strlen(numB);
    for(i=0;i != aLen/2; i++){
        c = numA[i];
        numA[i] = numA[aLen-1-i];
        numA[aLen-1-i] = c;
    }
    for(i=0;i != bLen/2; i++){
        c = numB[i];
        numB[i] = numB[bLen-1-i];
        numB[bLen-1-i] = c;
    }
    cx = 0;
    maxLen = aLen > bLen ? aLen : bLen;
    for(i=0;i != maxLen;i++){
        if(i < aLen && i < bLen){
            ax = (numA[i]-'0') + (numB[i]-'0') + cx;
            ans[i] = (ax%10) + '0';
            if(ax >= 10){
                cx = 1;
            }
            else{
                cx = 0;
            }
        }
        else if(i >= bLen){
            ax = (numA[i]-'0') + cx;
            ans[i] = (ax%10) + '0';
            if(ax >= 10){
                cx = 1;
            }
            else{
                cx = 0;
            }
        }
        else if(i >= aLen){
            ax = (numB[i]-'0') + cx;
            ans[i] = (ax%10) + '0';
            if(ax >= 10){
                cx = 1;
            }
            else{
                cx = 0;
            }
        }
    }
    if(cx != 0){
        ans[i++] = cx + '0';
    }
    flag=0;
    for(j = i-1;j >= 0;j--){
        if(ans[j]!='0'){
          flag=1;
          }
          if(flag==1){
           printf("%c",ans[j]);
           }
           if(flag==0 && j==0){
             printf("0");
             }
    }
    return 0;
}
int main()
{
	int a[250];
	int b[250];
	int c[251];
	char d[251];
	char e[251];
	int i,len1,len2,len;
	memset(a,0,sizeof(a));
	memset(b,0,sizeof(b));
	memset(c,0,sizeof(c));
	scanf("%s",d);
	scanf("%s",e);
	for(i=0;;i++)
		if(d[i]=='\0')
			break;
	len1=i;
	for(i=0;;i++)
		if(e[i]=='\0')
			break;
	len2=i;
	for(i=0;i<len1;i++)
		a[i]=d[len1-i-1]-'0';
	for(i=0;i<len2;i++)
		b[i]=e[len2-i-1]-'0';
	if(len1>len2)
		len=len1;
	else
		len=len2;
	for(i=0;i<len;i++)
	{
		c[i]=a[i]+b[i];
	}
	for(i=0;i<len;i++)
	{
		if(c[i]>9)
		{
			c[i+1]+=c[i]/10;
			c[i]%=10;
		}
	}
         for(i=len;i>=0;i--)
		 {
  	         if(c[i])
              {
		         printf("%d",c[i]);
                           break;         
              }
			 if(i==0)
				 printf("0");
		 }
			 
	for(i--;i>=0;i--)
		printf("%d",c[i]);
	return 0;
}
char a[N+1]={0},b[N+1]={0};
int c[N+1]={0},d[N+1]={0}; int e[N+2]={0};
int x=0,f,k,sum;
int main()
{ 
   int p=-1,q=-1;
   for(int i=1;;i++)
    {
            a[i]=cin.get();
            p++;
            if(a[i]=='\n')
             break;
    }
 
   for(int i=1;;i++)
   {
           b[i]=cin.get();
           q++;
           if(b[i]=='\n')
           break;
   }
  
   for(int i=1;i<=p;i++)
   {c[i]=a[p+1-i]-'0';
   }
  
    for(int i=1;i<=q;i++)
   {d[i]=b[q+1-i]-'0';
   }  
  
   for(int i=1;i<=N;i++)
   {
  
    e[i]+=c[i]+d[i];
    e[i+1]+=e[i]/10;
    e[i]%=10;
   
    }
    for(int i=N;i>=1;i--)
      {sum+=e[i];}
      if(sum==0)
      cout<<0;
      else
      {
    for(int i=N;i>=1;i--)
     {
      if(e[i]!=0)
      {
       k=i;
      for(int j=k;j>=1;j--) 
       cout<<e[j];
       break;
       }
       
       }}
    
     return 0;
}
int main()
{
    char s1[260],s2[260];
    scanf("%s",&s1);
    scanf("%s",&s2);
    int i,a1[260],m1,m2,a2[260];
    for(i=0;i<260;i++)
    a1[i]=0;
     for(i=0;i<260;i++)
    a2[i]=0;
    
    m1=strlen(s1);
     m2=strlen(s2);
   for(i=0;i<m1;i++)
   a1[m1-i-1]=s1[i]-'0';
      for(i=0;i<m2;i++)
   a2[m2-i-1]=s2[i]-'0';
   if(m2>m1)
   m1=m2;
    for(i=0;i<m1;i++)
    {
                     a1[i]=a1[i]+a2[i];
                     if(a1[i]>9)
                     {
                                a1[i]=a1[i]-10;
                                a1[i+1]=a1[i+1]+1;
                                }
                     }
                     int s=-1;
  for(i=m1;i>=0;i--)
  {if(a1[i]!=0)
  {s=i;
  break;    }
  }
  if(s==-1)
  printf("0");
 else
     {             for(i=s;i>=0;i--)
                   printf("%d",a1[i]);
                   }           
    getchar();getchar();getchar();getchar();getchar();getchar();
}
int cmp(const void *a, const void *b) {return *(int *)a - *(int *)b;}
//int n, tian[1000], qi[1000];
int a[300], b[300], c[300], la, lb;
int main()
{
	char xa[300], xb[300];
	cin>>xa>>xb;
	la = strlen(xa);
	lb = strlen(xb);
	for (int i = 0; i < la; i++)
		a[i] = xa[la - 1 - i] - '0';
	for (int i = 0; i < lb; i++)
		b[i] = xb[lb - 1 - i] - '0';
	int m = la > lb ? la : lb;
	int x = 0;
	for (int i = 0; i < m; i++)
	{
		int w = a[i] + b[i] + x;
		c[i] = w % 10;
		x = w / 10;
	}
	c[m] = x;
	int h;
	for (h = 299; h >= 0; h--)
		if (c[h] != 0) break;
	if (h == -1)
	{
		cout << "0"<<endl;
	}
	else
	{
		for (; h >= 0; h--)
			cout<<c[h];
		cout<<endl;
	}
//while (true)
//{
//	cin>>n;
//	if (n == 0) break;
//	for (int i = 0; i < n; i++)
//	{
//		cin>>tian[i];
//	}
//	for (int i = 0; i < n; i++)
//	{
//		cin>>qi[i];
//	}
//	qsort(tian, n, sizeof(int), cmp);
//	qsort(qi, n, sizeof(int), cmp);
//	int t = 0, q = 0, s = 0;
//	while (q < n)
//	{
//		int x;
//		for (x = t; x < n; x++)
//			if (tian[x] > qi[q]) break;
//		if (x == n)
//		{
//			for (x = t; x < n; x++)
//				if (tian[x] == qi[q]) break;
//			if (x == n)
//			{
//				s -= 200 * (n - q);
//				goto end;
//			}
//			else
//			{
//				q++;
//				t = x + 1;
//			}
//		}
//		else
//		{
//			s += 200;
//			q++;
//			t = x + 1;
//		}
//	}
//end:
//	cout<<s<<endl;
//}
}