int main()
{
	char a[251],b[251];
	int p[251]={0},q[251]={0},ans[251]={0},t;
	gets(a);
	gets(b);
	int len1=strlen(a);
	int len2=strlen(b);
	int max=len1;
	if(len2>len1)
		max=len2;
	for(int i=0,j=len1-1;i<len1;i++,j--)
		p[i]=a[j]-'0';
	for(int i=0,j=len2-1;i<len2;i++,j--)
		q[i]=b[j]-'0';
	for(int i=0;i<max;i++)
		ans[i]=p[i]+q[i];
	for(int i=0;i<max;i++)
		if(ans[i]>=10)
		{
			ans[i]=ans[i]-10;
			ans[i+1]=ans[i+1]+1;
		}
	for(t=max;t>=0;t--)
		if(ans[t]!=0)
			break;
	if(t==-1)
		cout<<0<<endl;
	else for(int i=t;i>=0;i--)
		cout<<ans[i];
	cout<<endl;
	return 0;
}


int main()
{
	int i,j;
	char num1[N],num2[N],tmp;
	int len1,len2,len_max,len_min;
	int result[N+1]={0};
	scanf("%s%s",num1,num2);
	len1=strlen(num1);
	len2=strlen(num2);
	len_max=len1>len2?len1:len2;
	len_min=len1<len2?len1:len2;
	for(j=0;j<len1/2;j++)
	{
		tmp=num1[j];
		num1[j]=num1[len1-1-j];
		num1[len1-1-j]=tmp;
	}
	for(j=0;j<len2/2;j++)
	{
		tmp=num2[j];
		num2[j]=num2[len2-1-j];
		num2[len2-1-j]=tmp;
	}
	for(j=0;j<len_min;j++)
	{
		result[j]+=num1[j]+num2[j]-'0'-'0';
		if(result[j]>=10)
		{
			result[j+1]+=1;
			result[j]=result[j]%10;
		}
	}
	for(j=len_min;j<len_max;j++)
	{
		if(len_max==len1)
		{
			result[j]+=num1[j]-'0';
			if(result[j]>=10)
			{
				result[j+1]+=1;
				result[j]=result[j]%10;
			}
		}
		else
		{
			result[j]+=num2[j]-'0';
			if(result[j]>=10)
			{
				result[j+1]+=1;
				result[j]=result[j]%10;
			}
		}
	}
	if(result[len_max]==1)
		len_max++;
	for(i=len_max-1;i>=0;i--)
	{
		if(result[i]!=0)
			break;
	}
	if(i>=0)
	{
		for(j=i;j>=0;j--)
			printf("%d",result[j]);
		printf("\n");
	}
	else
		printf("0\n");
	return 0;
}


int f(int *an1,int *an2);
int an1[211],an2[211],nHighestPos = 0;
char num1[211],num2[211];
int main()
{
    int i,j,len1,len2;
	memset(an1,sizeof(an1),0);
	memset(an2,sizeof(an2),0);
	cin>>num1>>num2;
	len1=strlen(num1);
	len2=strlen(num2);
	for(j=0,i=len1-1;i>=0;i--)
	{
	    an1[j++]=num1[i]-'0';
	}
	for(j=0,i=len2-1;i>=0;i--)
	{
	    an2[j++]=num2[i]-'0';
	}
	nHighestPos = f(an1,an2);
	for(i=nHighestPos;i>=0;i--)
		cout<<an1[i];
	return 0;
}
int f(int *an1,int *an2)
{
    int i;
	for(i=0;i<201;i++)
	{
	    an1[i]=an1[i]+an2[i];
		if(an1[i]>=10)
		{
		    an1[i]=an1[i]-10;
			an1[i+1]++;
		}
		if(an1[i])
			nHighestPos = i;
	}
	return nHighestPos;
}


void add()
{
	char a[255],b[255];
	int ua[255]={0},ub[255]={0},sum[255]={0};
	cin>>a>>b;
	int lena,lenb;
	lena=strlen(a),lenb=strlen(b);
	for (int i=0;i<lena;i++)
	{ua[i]=a[lena-1-i]-48;}//cout<<ua[i];}
//	cout<<endl;
	for (int i=0;i<lenb;i++)
	{ub[i]=b[lenb-1-i]-48;}//cout<<ub[i];}
//	cout<<endl;
	int max;
	if (lena>lenb) max=lena;
	else max=lenb;
	int temp;
	for (int i=0;i<max+1;i++)
	{
		temp=ua[i]+ub[i];
		ua[i+1]+=temp/10;
		sum[i]=temp%10;
//		cout<<temp<<endl;
	}
	int mark=0;
	for (int i=254;i>=0;i--)
	{
		if (sum[i]!=0)
		mark=1;
		if (mark==1)
		cout<<sum[i];
	}
	if (mark==0) cout<<"0";
	cout<<endl;
}

int main()
{
//	int n;
//	cin>>n;
//	for (int i=0;i<n;i++)
	add();
}


int Max(int X,int Y)
{
	return X > Y ? X : Y;
}
int main()
{
	char A[260],B[260];
	int C[260];
	gets(A);
	gets(B);
	int N = strlen(A);
	int M = strlen(B);
	int S = Max(N,M);
	memset(C,0,sizeof(C));
	for (int I = 0; I < N; I ++) C[I] = A[N - I - 1] - '0';
	for (int I = 0; I < M; I ++) C[I] = C[I] + B[M - I -1] - '0';
	for (int I = 0; I < S; I ++)
		if (C[I] >= 10)
		{
			C[I] = C[I] - 10;C[I + 1] ++;
		}
	while (C[S] == 0 && S >= 0) S --;
	for (int I = S; I >= 0; I --) cout << C[I];
	if (S<0) cout << 0;
}


int main()
{
	const int maxlen = 202;
	char szline1[maxlen];
	char szline2[maxlen];
	int an1[maxlen];
	int an2[maxlen];
	cin.getline(szline1, maxlen);
	cin.getline(szline2, maxlen);
	int len1 = strlen(szline1);
	int len2 = strlen(szline2);
	memset(an1, 0, sizeof (an1));
	memset(an2, 0, sizeof(an2));
	for (int i = len1 - 1, j = 0; i >= 0; i --)
		an1[j ++] = szline1[i] - '0';
	for (int i = len2 - 1, j = 0; i >= 0; i --)
		an2[j ++] = szline2[i] - '0';
	int begin;
	for (int i = 0; i < maxlen; i ++)
	{
		an1[i] += an2[i];
		if (an1[i] >= 10)
		{
			an1[i] -= 10;
			an1[i + 1] ++;
		}
		if (an1[i])
			begin = i;
	}
	for (int i = begin; i >= 0; i --)
		cout << an1[i];
	cout << endl;
	return 0;
}


int add(int maxlen,int *num1,int *num2);
char a[251],b[251];
int num1[251],num2[251],maxlen,len1,len2,highestpos;
int main()
{
   int i,j;
   cin>>a>>b;
   len1=strlen(a);
   len2=strlen(b);
   memset(num1,0,sizeof(num1));
   memset(num2,0,sizeof(num2));
   maxlen=(len1>len2)? len1:len2;
   for(i=len1-1,j=0;i>=0;i--,j++)
	   num1[i]=a[j]-'0';
   for(i=len2-1,j=0;i>=0;i--,j++)
	   num2[i]=b[j]-'0';
   highestpos=add( maxlen, num1, num2);
   for(i=highestpos;i>=0;i--)
	   cout<<num1[i];
   return 0;
}
int add(int maxlen,int *num1,int *num2)
{
   int i;
   highestpos=0;
   for(i=0;i<=maxlen;i++)
   {
      num1[i]=num1[i]+num2[i];
	  if(num1[i]>=10)
	  {
		  num1[i]=num1[i]-10;
		  num1[i+1]++;
	  }
	  if(num1[i]) highestpos=i;
   }
   return highestpos;
}


int main()
{
    char num1[252] = {0};
	char num2[252] = {0};
	char num3[253] = {0};
	cin>>num1>>num2;

    int maxLength;
	int num1Length = strlen(num1);
	int num2Length = strlen(num2);
    int i;

	if(num1Length >= num2Length)
		maxLength = num1Length;
	else
		maxLength = num2Length;

	int mark = 0;
	for(i = 0;i < maxLength || mark == 1;i++)
	{
		int a = 0;
		int b = 0;
		if(i < num1Length)
		   a = num1[num1Length -i - 1] - '0';
		if(i < num2Length)
			b = num2[num2Length -i - 1] - '0';
		int sum = a + b;
		if(mark == 1)
			sum++;
		if(sum >= 10)
		{
			sum -= 10;
			mark = 1;
		}
		else
			mark = 0;
		num3[i] = sum + '0';
	}
	int begin = maxLength;
	for(i = begin;i > 0;i--)
		if(num3[i] >= '1' && num3[i] <= '9')
			break;
		else
			begin--;

	for(i = begin;i >= 0;i--)
		cout<<num3[i];
	cout<<endl;

	return 0;
}


int main()
{
	const int MAX_LEN = 250;
	unsigned an1[MAX_LEN];
	unsigned an2[MAX_LEN];
	char seLine1[MAX_LEN + 1];
	char seLine2[MAX_LEN + 1];
	cin.getline(seLine1, MAX_LEN + 1);
	cin.getline(seLine2, MAX_LEN + 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 < MAX_LEN ;i++)
	{
		an1[i] += an2[i];
		if(an1[i] >= 10) //??????
		{
			an1[i] -=10;
			an1[i + 1]++; // i++?
		}
	}
	i = MAX_LEN - 1;
	for(;i>=0;i--)
		if(an1[i]!=0)
			break; //???????0??
	if(i==-1)
		cout<<0<<endl;
	else
	{
		for(;i >= 0; i--)
			cout << an1[i]; //??????
		cout << endl;
	}
	return 0;
}


int main()
{
	int a[MAX];
	int b[MAX];
	int r[MAX];
	memset(a, 0, sizeof(a));
	memset(b, 0, sizeof(b));
	memset(r, 0, sizeof(r));

	char tmp[MAX];
	int i, len;

	cin >> tmp;
	len = strlen(tmp);
	for (i = 0; i < len; i++)
		a[i] = tmp[len - 1 - i] - '0';

	cin >> tmp;
	len = strlen(tmp);
	for (i = 0; i < len; i++)
		b[i] = tmp[len - 1 - i] - '0';

	for (i = 0; i < MAX; i++)
	{
		int br = r[i] + a[i] + b[i];
		if (br < 10)
			r[i] = br;
		else
		{
			r[i] = br - 10;
			r[i + 1] = 1;
		}
	}

	i = MAX - 1;
	while (r[i] == 0 && i > 0)
		i--;

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

	return 0;
}


struct SeqList
{
	int MAXNUM;
	int n;
	int * element;
};
typedef struct SeqList * pSeqList;

pSeqList createNullList_Seq( int m)  //??????
{
	int i;
	pSeqList palist = (pSeqList) malloc(sizeof(struct SeqList));
	if (palist != NULL)
	{
		palist -> element = (int *)malloc(sizeof(int) * m);
		if(palist -> element)
		{
			palist -> MAXNUM = m;
			palist -> n = 0;
			for(i=0; i<m; i++)
				palist -> element[i] = 0;
			return palist;
		}
		else free( palist);
	}
	cout << "Out of space!! "<< endl;
	return NULL;
}

int isNullList_Seq(pSeqList palist)  //???????
{
	return (palist->n == 0);
}

int initialList_Seq(pSeqList pblist)  //??????
{
	int i;
	if(isNullList_Seq(pblist))
		return -1;

	for(i=0; i<pblist -> n; i++)
		pblist -> element[i] = 0;
	return 0;

}

int insertEnd_Seq(pSeqList palist, int x)
{
	if(palist->n >= palist->MAXNUM)  //??
	{
		cout << "Overflow! " << endl;
		return -1;
	}
	palist->element[palist->n] = x;
	palist->n += 1;
	return 0;
}

int add(pSeqList num1, pSeqList num2, pSeqList sum)
{
	int a = initialList_Seq( sum);   //?sum????????
	int i;
	for(i=0; i< MAX_LEN; i++)
		//?num1?num2???????????????sum??
		sum->element[i] = num1->element[i] + num2->element[i];
	for(i=0; i<= MAX_LEN; i++)
		if(sum->element[i] > 9)
		{
			sum->element[i] -= 10;
			sum->element[i+1] += 1;
		}
	return 0;

}

int printList_Seq(pSeqList result)  //????
{
	if(isNullList_Seq(result) == 0)  //??????
		return -1;
	int i;
	int flag = 0;
	for(i=MAX_LEN; i >=0; i--)
	{
		if(result->element[i] != 0)   //??????????????
			flag = 1;
		if(flag == 0)  continue;
		cout << result->element[i];
	}
	if(flag == 0)  cout << 0;
	cout << endl;
	return 0;
}

int main()
{
	pSeqList element1 = createNullList_Seq(MAX_LEN);
	pSeqList element2 = createNullList_Seq(MAX_LEN);
	pSeqList result = createNullList_Seq(MAX_LEN+1);

	char szLine1[MAX_LEN+10];
	char szLine2[MAX_LEN+10];
	cin >> szLine1 >> szLine2;

	int lenth1 = strlen(szLine1);
	int lenth2 = strlen(szLine2);
	//cout << "eeeee1" << endl;
	if(lenth1>MAX_LEN ||  lenth2>MAX_LEN)
	{
		cout << "Input error!!" << endl;
	    return 0;
	}
   //cout << "eeeee2" << endl;
	int i;
	for(i = lenth1-1; i>=0; i --)
	{
		int a = insertEnd_Seq(element1, szLine1[i]-'0');
		if(a == -1)
		{
			cout << "Input error !! " << endl;
			return 0;
		}
	}
    for(i = lenth2-1; i>=0; i --)
	{
		int b = insertEnd_Seq(element2, szLine2[i]-'0');
		if(b == -1)
		{
			cout << "Input error !! " << endl;
			return 0;
		}
	}
	//cout << "eeeee3" << endl;
	int c = add(element1, element2, result);
	if(c == -1)
	{
		cout << "Fail in add!! " << endl;
		return 0;
	}
	//cout << "eeeee4" << endl;
	printList_Seq(result);
	//cout << "eeeee5" << endl;

	return 0;
}


int main()
{
	char cNum1[300];
	char cNum2[300];
	cin >> cNum1 >> cNum2;
	int nNum1[300] = {0};
	int nNum2[300] = {0};
	int nResult[300] = {0};
	int i,j;
	for(i = strlen(cNum1) - 1, j = 0; i >= 0; i --, j ++)
	{
		nNum1[j] = cNum1[i] - '0';
	}
	for(i = strlen(cNum2) - 1, j = 0; i >= 0; i --, j ++)
	{
		nNum2[j] = cNum2[i] - '0';
	}
	for(i = 0; i < 299; i ++)
	{
		nResult[i] = nResult[i] + nNum1[i] + nNum2[i];
		if(nResult[i] >= 10)
		{
			nResult[i + 1] ++;
			nResult[i] %= 10;
		}
	}
	while(nResult[i] == 0 && i != 0)
	{
		i --;
	}
	for( ; i >= 0; i --)
	{
		cout << nResult[i];
	}
	cout << endl;
	return 0;
}


int strplus(char *strin1,char*strin2,char *strout);

int main()

{

	char a[251],b[251],c[252];

	int i;

	scanf("%s",&(a[1]));

	scanf("%s",&(b[1]));
	if (a[1]=='0'&&b[1]=='0'&&a[2]==0&&b[2]==0)
	{
		printf("0");
		return 0;
	}

	a[0]=b[0]=c[0]='0';

	strplus(a,b,c);

    for (i=0;c[i]=='0';i++);

	printf("%s",c+i);

	return 0;

}

int strplus(char *strin1,char*strin2,char *strout)

{

	int strlen1,strlen2,strlen3;

	int i,j,k;

	int temp,carry=0;

	i=strlen1=strlen(strin1);

	j=strlen2=strlen(strin2);

	k=strlen3=(strlen1>strlen2?strlen1:strlen2);

	strout[strlen3]=0;

	while (1)

	{

    	if (!i&&!j) break;

		if (i) i--;

		if (j) j--;

		k--;

		temp=strin1[i]-'0'+strin2[j]-'0'+carry;

		carry=temp/10;

		strout[k]=temp%10+'0';

	}
return 0;
}


int main ()
{
	char plus1[600] = {'\0'}, plus2[600] = {'\0'}, out[600] = {'\0'};
	out[0] = '0';
	cin.getline(plus1, 600, '\n');
	cin.getline(plus2, 600, '\n');
	int i = 0, mark1 = strlen(plus1), mark2 = strlen(plus2), len = 0, flag = 0;
	if(strlen(plus1) > strlen(plus2))
	{
		len = strlen(plus1);
		for(i = strlen(plus1) -	1; i >= mark1 - mark2; i --)
			plus2[i] = plus2[i - mark1 + mark2];
		for(i = mark1 - mark2 - 1; i >= 0; i --)
			plus2[i] = '*';
	}
	else if(strlen(plus2) > strlen(plus1))
	{
		len = strlen(plus2);
		for(i = strlen(plus2) -	1; i >= mark2 - mark1; i --)
			plus1[i] = plus1[i - mark2 + mark1];
		for(i = mark2 - mark1 - 1; i >= 0; i --)
			plus1[i] = '*';
	}
	else
		len = strlen(plus1);
	for(i = 0; i < len; i ++)
		if(plus1[i] == '*' || plus2[i] == '*')
			out[i + 1] = plus1[i] + plus2[i] - '*';
		else
			out[i + 1] = plus1[i] + plus2[i] - '0';
	for(i = len; i > 0; i --)
		if(out[i] > '9')
		{
			out[i] = out[i] - 10;
			out[i - 1] ++;
		}
	for(i = 0; i <= len; i ++)
		if(out[i] != '0')
		{
			flag = i;
			break;
		}
	if(i == len + 1)
		cout << '0';
	else
		for(i = flag; i <= len; i ++)
			cout << out[i];
	return 0;
}


main()
{
      int n,i,len1,len2;
      char str1[255],str2[255],str3[255];
      char c='0';
      scanf("%s %s",str1,str2);
      char temp[255];
      if(strlen(str1)<strlen(str2)) { strcpy(temp,str1);strcpy(str1,str2);strcpy(str2,temp);}
      len1=strlen(str1);
      len2=strlen(str2);
      str3[len1]='\0';
      int jinwei=0;
      for(i=len1-1;i>=0;i--)
      {
         if(i>=len1-len2)
         {
            if(str1[i]+str2[i-len1+len2]-'0'-'0'+jinwei<10)
            {
               str3[i]=str1[i]+str2[i-len1+len2]-'0'+jinwei;
               jinwei=0;
            }
            else
            {
                str3[i]=str1[i]+str2[i-len1+len2]-'0'+jinwei-10;
               jinwei=1;
            }
         }
         else
         {
             if(str1[i]-'0'+jinwei<10)
               { str3[i]=str1[i]+jinwei; jinwei=0;}
             else
             {  str3[i]=str1[i]+jinwei-10; jinwei=1;}
         }
      }
      int y=0;
      if(jinwei==1) {c='1';printf("%c%s",c,str3);}
      else
      {
          if(len1==1&&len2==1)
           { printf("%c",str3[0]);}
      else{
      for(i=0;i<len1;i++)
      {
         if(y==1)
           printf("%c",str3[i]);
         else
         {
         if(str3[i]>'0')
            {y=1; printf("%c",str3[i]);}
         }
      }
      }
      }

      return 0;
}


int a[300] , b[300] , c[300] ;

int  main()
{
	int flag = 0 ;

	for ( int i = 0 ; i < 300 ; i ++ ){
		a[i] = b[i] = c[i] = 0 ;
	}

	char arr[300] ;
	int len1 , len2 ;
	cin >> arr ;
	len1 = strlen(arr) ;
	for ( int i = 0 ; i < len1 ; i ++ ){
		a[i] = arr[len1-i-1]-'0' ;
	}
	cin >> arr ;
	len2 = strlen(arr) ;
	for ( int i = 0 ; i < len2 ; i ++ ){
		b[i] = arr[len2-i-1]-'0' ;
	}

	int len = (len1>len2?len1:len2) ;

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

	for ( int i = len ; i >= 0 ; i -- ){
		if ( c[i] != 0 ){
			flag = i ;
			break ;
		}
	}
	for ( int i = flag  ; i >= 0 ; i -- ){
		cout << c[i] ;
	}
	cout << endl ;

	return 0 ;
}


int main()
{
	char a[501], b[501];
	int  a1[502], b1[502], result[502];
	int length1 = 0, length2 = 0, i = 0, j = 0, length = 0;
	cin.getline(a,500);
	cin.getline(b,500);
	length1 = strlen(a);
	length2 = strlen(b);
	memset(a1,0,sizeof(a1));
	memset(b1,0,sizeof(b1));
	memset(result, 0 ,sizeof(result));
    for(i = 0; i <= length1 - 1; i++)
	{
		a1[i] = (int)a[length1 - 1 - i] - (int)'0';
	}
	for(i = 0; i <= length2 - 1; i++)
	{
		b1[i] = (int)b[length2 - 1 - i] - (int)'0';
	}
	for(i = 0; i <= 500; i++)
	{
		result[i] = a1[i] + b1[i] + result[i];
		if(result[i] > 9)
		{
			result[i] = result[i] - 10;
			result[i+1]++;
		}
	}
	for(i = 500; i >= 0; i--)
	{
		if(result[i] != 0)
			break;
	}
	if(i != 0)
	{
		for(j = i; j >= 0; j--)
		{
			cout << result[j];
		}
	}
	if(i == -1)
		cout << 0;
	cout << endl;
	return 0;
}


int main(){
	int a[251], b[251], c[251];

	for(int i = 0; i < 251; i++){
		a[i] = 0;
		b[i] = 0;
		c[i] = 0;
	}
	char str_a[251] = {0};
	char str_b[251] = {0};
	cin >> str_a >> str_b;

	int len_a = strlen(str_a);
	int len_b = strlen(str_b);

	int mid;
	if(len_a%2 == 0)
		mid = len_a/2 - 1;
	else
		mid = len_a/2;
	for(int i = 0; i <=mid; i++){
			int tmp = str_a[i];
			str_a[i] = str_a[len_a - 1 - i];
			str_a[len_a - 1 - i] = tmp;
	}

	if(len_b%2 == 0)
		mid = len_b/2 - 1;
	else
		mid = len_b/2;
	for(int i = 0; i <= mid; i++){
			int tmp = str_b[i];
			str_b[i] = str_b[len_b - 1 - i];
			str_b[len_b - 1 - i] = tmp;
	}

	for(int i = 0; i < len_a; i++){
		a[i] = str_a[i] - '0';
	}
	for(int i = 0; i < len_b; i++){
		b[i] = str_b[i] - '0';
	}

	int in = 0;
	int len = 0;
	if(len_a >= len_b)
		len = len_a;
	else
		len = len_b;
	for(int i = 0; i <= len; i++){
		int sum = a[i] + b[i] + in;
		if(sum > 9)
		{
			in = 1;
			c[i] = sum - 10;
		}
		else
		{
			in = 0;
			c[i] = sum;
		}
	}

	int k = 0;
	for(int i = len+1; i >=0; i--){
		if(c[i] != 0)
		{
			k = i;
			break;
		}
	}
	for(int i = k; i >=0; i--)
		cout << c[i];
	return 0;
}


char a[1000],b[1000];
int c[1000],d[1000],result[1000];
int main()
{
	memset(c,0,sizeof(c));
	memset(d,0,sizeof(d));
	memset(result,0,sizeof(result));
	cin>>a;
	cin>>b;
	int len1,len2,i,j=0;
	len1=strlen(a);
	len2=strlen(b);
	for(i=len1-1;i>=0;i--)
	{
		c[j]=a[i]-'0';
		j++;
	}
	j=0;
	for(i=len2-1;i>=0;i--)
	{
		d[j]=b[i]-'0';j++;
	}
	for(i=0;i<len1||i<len2;i++)
	{
		result[i]=c[i]+d[i]+result[i];
		if(result[i]>=10)
		{
			result[i+1]++;
			result[i]=result[i]-10;
		}
	}
	i=999;
	while(result[i]==0&&i>=0)
		i--;
	if(i<0)
		cout<<"0"<<endl;
	else
	{
		for(j=i;j>=0;j--)
			cout<<result[j];
		cout<<endl;
	}
	return 0;
}


int larger(int a ,int b)
{
	if(a > b)
		return a;
	return b;
}
int main()
{
	char IN_1[MAX] = {0};
	char IN_2[MAX] = {0};
	cin.getline(IN_1,MAX);
	cin.getline(IN_2,MAX);
	int input_1[MAX] = {0};
	int input_2[MAX] = {0};
	int length_1 = strlen(IN_1);
	int length_2 = strlen(IN_2);
	for(int i = 0; i < length_1 ;i++)
		input_1[length_1 - i -1] = (int)(IN_1[i] - '0');
	for(int i = 0; i < length_2 ;i++)
		input_2[length_2 - i -1] = (int)(IN_2[i] - '0');
	int output[MAX] = {0};
	int i = 0;
	for( ; i < larger(length_1 , length_2); i++)
	{
		int temp = input_1[i] + input_2[i] + output[i];
		output[i+1] += temp /10;
		output[i] = temp % 10;
	}
	while(output[i] == 0)
		i--;
	if(i < 0)
		cout<<0;
	for(;i >= 0;i--)
	{
		cout<<output[i];
	}
	cout<<endl;
	return 0;
}


int main()
{
	int i,j,la,lb,l,a2[251],b2[251],result[251];
	char a[251],b[251];
	cin.getline(a,251);
	cin.getline(b,251);
	la=strlen(a);
	lb=strlen(b);
	if(la>lb) l=la;
	else l=lb;
	memset(result,0,sizeof(result));
	memset(a2,0,sizeof(a2));
	memset(b2,0,sizeof(b2));
	for(i=0;i<la;i++)
		a2[i]=a[la-i-1]-48;
	for(i=0;i<lb;i++)
		b2[i]=b[lb-i-1]-48;
	for(i=0;i<l;i++)
	{
		result[i]=result[i]+a2[i]+b2[i];
		if(result[i]>=10)
		{
			result[i]=result[i]-10;
			result[i+1]++;
		}
	}
	if((a2[0]==0)&&(b2[0]==0)) cout<<'0';
	else
	{
		for(i=250;i>0;i--)
		{
			if(result[i]!=0) break;
		}
		for(j=i;j>=0;j--)
			cout<<result[j];
	}

	return 0;
}


/****???:???****/
/**??:2012?3?5?**/
/**??:1100012450****/
/**?????????*/
/**????????????**/
int count=1,x1=0;//?????create???print??
struct Node; //????
typedef struct Node *PNode;
struct Node{
    int num;
    PNode llink;
    PNode rlink;
};
typedef struct Node *Linklist;
Linklist createNullList_link(void) //?????
{
    PNode p=(PNode)malloc(sizeof(struct Node));
    if(p!=NULL) p->rlink=p->llink=NULL;
    else printf("out of space!\n");
    return (p);
}
Linklist create() //????????
{
    //printf("????%d????\n",count);
    char c; //???????
    int X=0;
    Linklist p;
    p=createNullList_link();
    p->rlink=NULL;
    while((c=getchar())!='\n') //???????????????????
    {
        PNode q=(PNode)malloc(sizeof(struct Node));
        if(q!=NULL)
        {
            if(c=='-') {X=1;continue;}
            if(X==1) q->num=-1*(c-'0'); //???????????
            else q->num=c-'0';
            q->rlink=p;
            q->llink=NULL;
            p->llink=q;
            p=q;
        }
        else
        printf("out of space!\n");
    }
    count++; //???????????
    return (p);
}
void print(Linklist llist) //???????
{
    int x0=0;
    while(llist->rlink!=NULL)
    {
        if(llist->num>0&&llist->rlink->num<0)  //????????
        {
            llist->num--;
            llist->rlink->num+=10;
        }
        if(llist->num==0&&llist->rlink->num<0)
        {
            printf("-");
        }
        if(x0==0&&llist->rlink->rlink!=NULL&&llist->num==0&&x1==0) //?????????????0
        {
            llist=llist->rlink;
            continue;
        }
        printf("%d",abs(llist->num));
        llist=llist->rlink;
        x0++;
    }
}
Linklist add(Linklist p1,Linklist p2,Linklist q) //????
{
    int Jw=0;//????
    int out=0;//?????????
    while((p1->rlink!=NULL)||(p2->rlink!=NULL))
    {
        if((p1->rlink!=NULL)&&(p2->rlink!=NULL))
        {
            out=p1->num+p2->num+Jw;
            p1=p1->rlink;
            p2=p2->rlink;
        }
        else if((p1->rlink==NULL)&&(p2->rlink!=NULL))//??1???????????2????1?
        {
            out=0+p2->num+Jw;
            p2=p2->rlink;
        }
        else//??2???????????1????2?
        {
            out=p1->num+0+Jw;
            p1=p1->rlink;
        }

        Jw=0;
        PNode p=(PNode)malloc(sizeof(struct Node));
        if(p==NULL) printf("out of space!\n");
        if(out>0||out==0)
        p->num=(out%10);
        else
        {
            p->num=-1*((-1*out)%10);
        }
        p->rlink=q;
        p->llink=NULL;
        q->llink=p;
        q=p;
        if(out>0||out==0)
        Jw=out/10;
        else if(out<(-1*9))
        Jw=-1;
    }
 //   printf("???????\n");
    if(Jw==1) {printf("1");x1=1;} //??????????1????????????
    if(Jw==-1&&out!=0) {printf("-1");x1=1;} //????????????1???
    else if(out<0) printf("-"); //??
    return q;
}
void destroy1List_link(Linklist llist)  //??????
{
    PNode p;
    while(llist!=NULL)
    {
        p=llist;
        llist=llist->rlink;
        free(p);
    }
}
void destroy2List_link(Linklist llist)  //??????
{
    PNode p;
    while(llist!=NULL)
    {
        p=llist;
        llist=llist->llink;
        free(p);
    }
}
int main()
{
   // printf("?????????????????\n");
    Linklist l1,l2,l3;
    l1=create(); //????????
    l2=create(); //????????
    l3=(PNode)malloc(sizeof(struct Node)); //??????
    if(l3==NULL)
    printf("out of space!\n");
    l3->rlink=l3->llink=NULL;
    l3=add(l1,l2,l3);//???????????????l3
    print(l3);//??????
    destroy2List_link(l3);
    destroy1List_link(l1);
    destroy1List_link(l2);
   //printf("\n?????\n");
    return 0;
}


int main()
{
	int an1[MAX_LEN];
	int an2[MAX_LEN];
    int sum[MAX_LEN];
	char seLine1[MAX_LEN];
	char seLine2[MAX_LEN];

	gets(seLine1);
	gets(seLine2);

	int nLen1 = strlen(seLine1);
	int nLen2 = strlen(seLine2);

	memset(an1, 0, sizeof(an1));
	memset(an2, 0, sizeof(an2));
    memset(sum, 0, sizeof(sum));

	int i, j, c;
	for (i = nLen1-1,j=0; i>=0; i--, j++)
		an1[j] = seLine1[i] - '0';
	for (i = nLen2-1,j=0; i>=0; i--, j++)
		an2[j] = seLine2[i] - '0';

	c = 0;
	for (i = 0; i < MAX_LEN ; i++)
	{
		sum[i] = an1[i] + an2[i] + c;
		c=0;
		while(sum[i] >= 10)
		{
			sum[i] -= 10;
			c++;
		}

	}
	i = MAX_LEN-1;
	while(sum[i]==0) i--;
	if(i==-1)printf("0");
	for(;i >= 0; i--)
		printf("%d", sum[i]);
	printf("\n");

	return 0;
}


int main(){
  char s1[MAX],s2[MAX];
  cin>>s1>>s2;
  int l1=strlen(s1),l2=strlen(s2);
  int g=0;
  char ans[2*MAX];
  int iter;
  for(iter=0;g||iter<max(l1,l2);iter++){
    int p1=0,p2=0;
    if(iter<l1) p1=s1[l1-iter-1]-'0';
    if(iter<l2) p2=s2[l2-iter-1]-'0';
    int sum=p1+p2+g;
    ans[iter]=sum%10+'0';
    g=sum/10;
  }
  int ok=0;
  for(int i=0;i<iter;i++){
    if(!(ans[iter-i-1]=='0'&&ok==0&&iter!=1)){
      cout<<ans[iter-i-1];
      if(ok==0) ok=1;
    }
  }
  return 0;
}


char szline1[maxlen];
char szline2[maxlen];
int an1[maxlen];
int an2[maxlen];
int main()
{
	cin.getline(szline1, maxlen);
	cin.getline(szline2, maxlen);
	int len1 = strlen(szline1);
	int len2 = strlen(szline2);
	for (int i = len1 - 1, j = 0; i >= 0; i --)
		an1[j ++] = szline1[i] - '0';
	for (int i = len2 - 1, j = 0; i >= 0; i --)
		an2[j ++] = szline2[i] - '0';
	int begin;
	for (int i = 0; i < maxlen; i ++)
	{
		an1[i] += an2[i];
		if (an1[i] >= 10)
		{
			an1[i] -= 10;
			an1[i + 1] ++;
		}
		if (an1[i])
			begin = i;
	}
	for (int i = begin; i >= 0; i --)
		cout << an1[i];
	cout << endl;
	return 0;
}


int an1[MAX_LEN];
int an2[MAX_LEN];
char szline1[MAX_LEN];
char szline2[MAX_LEN];

int main()
{
	scanf("%s",szline1);
	scanf("%s",szline2);

	int i,j;
	int maxlen;
	memset(an1,0,sizeof(an1));
	memset(an2,0,sizeof(an2));

	int len1,len2;
	len1 = strlen(szline1);
	len2 = strlen(szline2);
	for(j = 0,i = len1 - 1; i >= 0; i --)
		an1[j++] = szline1[i] - '0';
	for(j = 0,i = len2 - 1; i >= 0; i --)
		an2[j++] = szline2[i] - '0';

	if(len1 > len2)
		maxlen = len1;
	else
		maxlen = len2;

	int startpos = 0;
	for(i = 0; i < maxlen; i ++)
	{
		if(an1[i]+an2[i] >= 10)
		{
			an1[i] = an1[i] + an2[i] - 10;
			an1[i+1] ++;
		}
		else
			an1[i] += an2[i];
		if(an1[i])
			startpos = i;
	}
	if(an1[i])
		startpos = i;
	if(startpos == 0)
		printf("0");
	else
	{
		for(i = startpos;i >=0; i--)
			printf("%d",an1[i]);
	}
	printf("\n");
	return 0;
}


int a[200];
int b[200];
int out[200];
void init(){
     for(int i=0;i<200;i++){
             a[i]=0;
             b[i]=0;
             out[i]=0;
     }
}
void load(){
     char temp[201];
     cin>>temp;
     int begin = 200 - strlen(temp);
     for(int i=0;i<strlen(temp);i++){
             a[begin+i]=temp[i]-'0';
     }
     cin>>temp;
     begin = 200 - strlen(temp);
     for(int i=0;i<strlen(temp);i++){
             b[begin+i]=temp[i]-'0';
     }
}
void add(){
     int carry = 0;
	 int i=0;
     for(i=199;i>=0;i--){
             out[i] = a[i] + b[i] + carry;
             if(out[i]>=10){
				 out[i]-=10;
                 carry = 1;
             }
			 else
				 carry =0;
	 }
     for(i=0;i<199;i++){
		 if(out[i]!=0)
         break;
	 }
     for(;i<200;i++){
		 cout<<out[i];
	 }
	 cout<<endl;
}
int main(){
    init();
    load();
    add();
    return 0;
}


typedef int data;
struct node;
typedef struct node* pnode;
struct node
{
  data value;
  pnode pnext;
};
void node_create(pnode *pheader,int l,char a[length],int max)
{
  pnode p=*pheader;
  p->pnext=NULL;
  for(int i=0;i<l;i++)
  {
     pnode pnew=(pnode)malloc(sizeof (struct node));
     pnew->value=a[i]-'0';
     pnew->pnext=p->pnext;
     p->pnext=pnew;
     p=*pheader;
  }
  for(int i=0;i<l;i++) p=p->pnext;
  for(int i=l-1;i<=max;i++)
  {
     pnode pnew=(pnode)malloc(sizeof (struct node));
     pnew->value=0;
     pnew->pnext=p->pnext;
     p->pnext=pnew;
     p=p->pnext;
  }
}
void node_plus(pnode pheader1,pnode pheader2,pnode* pheader3,int max)
{
   int sum,num=0;
   pnode p1=pheader1->pnext;
   pnode p2=pheader2->pnext;
   pnode p3=(*pheader3)->pnext;
   for(int i=0;i<=max;i++)
   {
         sum=p1->value+p2->value+num;
         if(sum<10) {p3->value=sum;num=0;}
         else {p3->value=sum-10;num=1;}
         p1=p1->pnext;
         p2=p2->pnext;
         p3=p3->pnext;
   }
}

void output(pnode pheader3,int l)
{
  int t;
  pnode p=pheader3;
  int a[length]={0};
  for(int i=0;i<l;i++)
  {p=p->pnext;a[i]=p->value;}
  for(int i=l-1;i>=0;i--) {if(a[i]!=0) {t=i;break;}}
  for(int i=t;i>=0;i--) {printf("%d",a[i]);}
}
main()
{
   struct node header1,header2,header3;
   pnode pheader1=&header1;
   pnode pheader2=&header2;
   pnode pheader3=&header3;
   int l1,l2;
   int max;
   char a1[length]={'\0'},a2[length]={'\0'},a3[length+1]={'\0'};
   for(int i=0;i<length+1;i++) {a3[i]='0';}
   gets(a1);
   l1=strlen(a1);
   gets(a2);
   l2=strlen(a2);
   if(l1>=l2) max=l1+1;
   else max=l2+1;
   node_create(&pheader1,l1,a1,max);
   node_create(&pheader2,l2,a2,max);
   node_create(&pheader3,max,a3,max);
   node_plus(pheader1,pheader2,&pheader3,max);
   output(pheader3,max);

   getchar();
   getchar();
}


/*
 * wanyi.cpp
 *
 *  Created on: 2012-11-21
 *      Author: 7
 */
char c[300];
void change(char a[250],char b[250],int la,int lb)
{
	int sig=1;
	c[la]=a[la-1];
	if(lb>0)
		{
			c[la]=a[la-1]+b[lb-1]-'0';
		}
	if(c[la]>'9')
	{
		c[la]=c[la]-10;
		if(la>1)
		a[la-2]+=1;
		else
			c[0]='1';
	}
	if(la>1)
	change(a,b,la-1,lb-1);
	else
	{
		for(int i=0;i<(int)strlen(c);i++)
			{
			if(sig&&c[i]=='0')
				{continue;}
			else {cout<<c[i];sig=0;}
			}
		if(sig)
			cout<<0;
	}
}
int main()
{
	memset(c,'\0',sizeof(c));
	c[0]='0';
	char a[300];
	char b[300];
	cin.getline(a,250,'\n');
	cin.getline(b,250,'\n');
	if(strlen(a)>strlen(b))change(a,b,strlen(a),strlen(b));
	else change(b,a,strlen(b),strlen(a));
}


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]);
}

int add(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]>=10)
		{
			c[i+1]+=c[i]/10;
			c[i]%=10;
		}
	}
	return c[len]?(len+1):len;
}

void 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(a,alen,b,blen,c);
	print_bigint(c,clen);
}


int main()

{

char s1[251],s2[251];
int sum[251];
int flag=0;

int i,j,k;

int len1,len2;

int min,max;

memset(s1,0,sizeof(s1));
memset(s2,0,sizeof(s2));
cin.getline(s1,sizeof(s1));
cin.getline(s2,sizeof(s2));

memset(sum,0,sizeof(sum));

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

min=(len1>len2)? len2:len1;
max=(len1>len2)? len1:len2;

for(i=min-1;i>=0;i--)
{
    sum[max-(min-1-i)]=s2[len2-1-(min-1-i)]-'0'+s1[len1-1-(min-1-i)]-'0';

}

if(max==len1)
{
for(i=max-min;i>=1;i--)
{
	sum[i]=s1[i-1]-'0';
}
}else{
	for(i=max-min;i>=1;i--)
{
	sum[i]=s2[i-1]-'0';
}
}

for(i=max;i>=1;i--)
{
	sum[i-1]=sum[i-1]+sum[i]/10;
	sum[i]=sum[i]%10;
}
j=0;
while(sum[j]==0 && j<=max)
{
	j++;

}

if(sum[j]!=0)
{
    for(i=j;i<=max;i++)
	{
		cout<<sum[i];
	}
}

else{
	cout<<0;
}

	return 0;

}


/*
 * add large number.cpp
 *??:?????
 *  Created on: 2012-11-27
 *      Author: ???
 */

char num1[260];
char num2[260];
char result[260];
int len1,len2;
void add();
int main ()
{

	cin.getline(num1,250);
	cin.getline(num2,250);
	len1=strlen(num1);
	len2=strlen (num2);
    add();
    return 0;
}

void add()
{
	if(len1>len2)
	{
		int i=0;
	    for(i=0;i<len2;i++)
	   {
		result[len1-i]=result[len1-i]+num1[len1-1-i]+num2[len2-1-i]-48;
		if(result[len1-i]>57)
			{
			result[len1-i]=result[len1-i]-10;
			result[len1-i-1]++;
			}
	   }
	    for(i=len2;i<len1;i++)
	    {
	    	result[len1-i]=result[len1-i]+num1[len1-i-1];
	    	if(result[len1-i]>57)
	    			{
	    			result[len1-i]=result[len1-i]-10;
	    			result[len1-i-1]++;
	    			}
	    }
        for(i=0;i<=len1;i++)
        	if(result[i]!='0'&&result[i]!='\0')
        		break;
            if(i==len1)
               cout<<result[1];
            else{
        if(48<result[i]&&result[i]<=57)
    	            	;
    	        else
    	       result[i]=result[i]+48;
        for(i=i;i<=len1;i++)
        	cout<<result[i];}
	}
	else
	{
		int i=0;
	    for(i=0;i<len1;i++)
	   {
		result[len2-i]=result[len2-i]+num1[len1-1-i]+num2[len2-1-i]-48;
		if(result[len2-i]>57)
			{
			result[len2-i]=result[len2-i]-10;
			result[len2-i-1]++;
			}
	   }
	    for(i=len1;i<len2;i++)
	    {
	    	result[len2-i]=result[len2-i]+num2[len2-i-1];
	    	if(result[len2-i]>57)
	    			{
	    			result[len2-i]=result[len2-i]-10;
	    			result[len2-i-1]++;
	    			}
	    }
	    for(i=0;i<len2;i++)
	           	if(result[i]!='0'&&result[i]!='\0')
	           		break;
	            if(i==len2)
	                   cout<<result[1];
	            else
	            	{if(48<result[i]&&result[i]<=57)
	            	;
	            else
	            	result[i]=result[i]+48;
	           for(i=i;i<=len2;i++)
	           	cout<<result[i];}
	}
}


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;
}


struct node//????  PHEADER???????
{
       int value;
       struct node *pNext;
};
void insertAt(struct node *pHeader,char c,int n)//??N????????
{
     int i;
     for(i=1;i<n;i++)
     {
                     pHeader=pHeader->pNext;
     }
     struct node *ptemp=(struct node *)malloc(sizeof(struct node));
     ptemp->pNext=pHeader->pNext;
     pHeader->pNext=ptemp;
     ptemp->value=c-'0';
}
int getAt(struct node *pHeader,int n)//????????N??
{
    int i;
    struct node *ptemp;
    for(i=0;i<n;i++)
    {
                     pHeader=pHeader->pNext;
    }
    return pHeader->value;
}
int compare(struct node *pHeader1,int n1,struct node *pHeader2,int n2)//?????????????????????1??????-1?????0
{
    int i;
    int ans=0;
    if(n1>n2) return 1;
    else if(n1<n2) return -1;
    else
    {
        for(i=1;i<=n1;i++)
        {
                         if(getAt(pHeader1,i)>getAt(pHeader2,i))
                         {
                                    ans=1;
                                    break;
                         }
                         else if(getAt(pHeader1,i)<getAt(pHeader2,i))
                         {
                              ans=-1;
                              break;
                         }
        }
        return ans;
    }
}
main()
{
      char c;
      int n1,n2,n3;
      int temp,i,jinwei,jiewei;
      struct node *pHeader1=(struct node *)malloc(sizeof(struct node));//?2?????,?3????????
      struct node *pHeader2=(struct node *)malloc(sizeof(struct node));
      struct node *pHeader3=(struct node *)malloc(sizeof(struct node));
      pHeader1->pNext=NULL;//?????????NULL
      pHeader2->pNext=NULL;
      pHeader3->pNext=NULL;
      n1=0;//?????????
      for(;;)
      {
             scanf("%c",&c);
             if(c=='\n') break;//????,????
             else
             {
                 n1++;
                 insertAt(pHeader1,c,n1);//????
             }
      }
      n2=0;//?????????
      for(;;)
      {
             scanf("%c",&c);
             if(c=='\n') break;//????,????
             else
             {
                 n2++;
                 insertAt(pHeader2,c,n2);//????
             }
      }
      if((getAt(pHeader1,1)!='-'-'0')&&(getAt(pHeader2,1)!='-'-'0')||((getAt(pHeader1,1)=='-'-'0')&&(getAt(pHeader2,1)=='-'-'0')))//??2????????????????
      {
                   if((getAt(pHeader1,1)=='-'-'0')&&(getAt(pHeader2,1)=='-'-'0'))//??2???????????????????????2????????1????????????
                   {
                               pHeader1=pHeader1->pNext;
                               pHeader2=pHeader2->pNext;
                               n1--;
                               n2--;
                               printf("-");
                   }
                   jinwei=0;//?????????
                   n3=0;//???????
                   if(n1>=n2)//????????????????
                   {
                                for(i=0;i<n2;i++)//?N2??
                                {
                                         temp=getAt(pHeader1,n1-i)+getAt(pHeader2,n2-i)+jinwei;//??????????
                                         if(temp>=10)
                                         {
                                             temp=temp-10;//??10,?????????
                                             jinwei=1;
                                         }
                                         else jinwei=0;
                                         n3++;//???????
                                         insertAt(pHeader3,temp+'0',n3);//????????? ,???????????,????????????????
                                }
                                for(i=n2;i<n1;i++)//?N2?N1??
                                {
                                           temp=getAt(pHeader1,n1-i)+jinwei;
                                           if(temp>=10)
                                           {
                                             temp=temp-10;
                                             jinwei=1;
                                           }
                                           else jinwei=0;
                                           n3++;
                                           insertAt(pHeader3,temp+'0',n3);
                                }
                                if(jinwei==1)//???????????????,?????????
                                {
                                         n3++;
                                         insertAt(pHeader3,'1',n3);
                                }
                   }
                   else//???????????????
                   {
                                 struct node*ptemp;//??????????????????,???????????
                                 int ntemp;
                                 ptemp=pHeader1;
                                 pHeader1=pHeader2;
                                 pHeader2=ptemp;
                                 ntemp=n1;
                                 n1=n2;
                                 n2=ntemp;
                                 for(i=0;i<n2;i++)//??????
                                 {
                                             temp=getAt(pHeader1,n1-i)+getAt(pHeader2,n2-i)+jinwei;
                                             if(temp>=10)
                                             {
                                                   temp=temp-10;
                                                   jinwei=1;
                                             }
                                             else jinwei=0;
                                             n3++;
                                             insertAt(pHeader3,temp+'0',n3);
                                 }
                                 for(i=n2;i<n1;i++)
                                 {
                                            temp=getAt(pHeader1,n1-i)+jinwei;
                                            if(temp>=10)
                                            {
                                               temp=temp-10;
                                               jinwei=1;
                                            }
                                            else jinwei=0;
                                            n3++;
                                            insertAt(pHeader3,temp+'0',n3);
                                 }
                                 if(jinwei==1)
                                 {
                                              n3++;
                                              insertAt(pHeader3,'1',n3);
                                 }
                   }
      }
      else if((getAt(pHeader1,1)!='-'-'0')&&(getAt(pHeader2,1)=='-'-'0'))//???????????????????
      {
           pHeader2=pHeader2->pNext;//??????????
           n2--;
           jiewei=0;//???????
           n3=0;
           if(compare(pHeader1,n1,pHeader2,n2)<0)//???????????????????????????????????
           {
                   printf("-");
                   struct node*ptemp;//??????????????????,???????????
                   int ntemp;
                   ptemp=pHeader1;
                   pHeader1=pHeader2;
                   pHeader2=ptemp;
                   ntemp=n1;
                   n1=n2;
                   n2=ntemp;
           }
           for(i=0;i<n2;i++)//???????????????????????????????????????????????
           {
                         temp=getAt(pHeader1,n1-i)-getAt(pHeader2,n2-i)+jiewei;
                         if(temp<0)
                         {
                                   temp=temp+10;
                                   jiewei=-1;
                         }
                         else jiewei=0;
                         n3++;
                         insertAt(pHeader3,temp+'0',n3);
           }
           for(i=n2;i<n1;i++)
           {
                          temp=getAt(pHeader1,n1-i)+jiewei;
                          if(temp<0)
                          {
                                    temp=temp+10;
                                    jiewei=-1;
                          }
                          else jiewei=0;
                          n3++;
                          insertAt(pHeader3,temp+'0',n3);
           }
      }
      else//?????????????????????????
      {
                pHeader1=pHeader1->pNext;
                n1--;
                jiewei=0;
                n3=0;
                if(compare(pHeader1,n1,pHeader2,n2)>0) printf("-");//????????????????????
                if(compare(pHeader1,n1,pHeader2,n2)<0)//????????????????????????????????????????????????
                {
                      struct node*ptemp;//??????????????????,???????????
                      int ntemp;
                      ptemp=pHeader1;
                      pHeader1=pHeader2;
                      pHeader2=ptemp;
                      ntemp=n1;
                      n1=n2;
                      n2=ntemp;
                }
                for(i=0;i<n2;i++)
                {
                         temp=getAt(pHeader1,n1-i)-getAt(pHeader2,n2-i)+jiewei;
                         if(temp<0)
                         {
                                   temp=temp+10;
                                   jiewei=-1;
                         }
                         else jiewei=0;
                         n3++;
                         insertAt(pHeader3,temp+'0',n3);
                }
                for(i=n2;i<n1;i++)
                {
                          temp=getAt(pHeader1,n1-i)+jiewei;
                          if(temp<0)
                          {
                                    temp=temp+10;
                                    jiewei=-1;
                          }
                          else jiewei=0;
                          n3++;
                          insertAt(pHeader3,temp+'0',n3);
                }
      }
      //????????????
      if(n3==1&&getAt(pHeader3,n3)==0) printf("0");//??0+0??,????0
      else
      {
          int jilu=0;//??????,?????????????,???????0099,????0023,??????0
          for(i=0;i<n3;i++)
          {
                   if(getAt(pHeader3,n3-i)==0&&jilu==0) continue;//??????0,?????????0??, (???jilu=0),????????
                   else
                   {
                       jilu=1;//???????,????
                       printf("%d",getAt(pHeader3,n3-i));//???
                   }
          }
          if(jilu==0) printf("0");//???????????????N?0??jilu????0??????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);

}


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;
}


struct node
{
       int value;
       struct node *pNext;
};
void insertAt(struct node *pHeader,char c,int n)
{
     int i;
     for(i=1;i<n;i++)
     {
                     pHeader=pHeader->pNext;
     }
     struct node *ptemp=(struct node *)malloc(sizeof(struct node));
     ptemp->pNext=pHeader->pNext;
     pHeader->pNext=ptemp;
     ptemp->value=c-'0';
}
int getAt(struct node *pHeader,int n)
{
    int i;
    struct node *ptemp;
    for(i=0;i<n;i++)
    {
                     pHeader=pHeader->pNext;
    }
    return pHeader->value;
}
main()
{
      char c;
      int n1,n2,n3;
      int temp,i,jinwei;
      struct node *pHeader1=(struct node *)malloc(sizeof(struct node));
      struct node *pHeader2=(struct node *)malloc(sizeof(struct node));
      struct node *pHeader3=(struct node *)malloc(sizeof(struct node));
      pHeader1->pNext=NULL;
      pHeader2->pNext=NULL;
      pHeader3->pNext=NULL;
      n1=0;
      for(;;)
      {
             scanf("%c",&c);
             if(c=='\n') break;
             else
             {
                 n1++;
                 insertAt(pHeader1,c,n1);
             }
      }
      n2=0;
      for(;;)
      {
             scanf("%c",&c);
             if(c=='\n') break;
             else
             {
                 n2++;
                 insertAt(pHeader2,c,n2);
             }
      }
      jinwei=0;
      n3=0;
      if(n1>=n2)
      {
               for(i=0;i<n2;i++)
               {
                                temp=getAt(pHeader1,n1-i)+getAt(pHeader2,n2-i)+jinwei;
                                if(temp>=10)
                                {
                                             temp=temp-10;
                                             jinwei=1;
                                }
                                else jinwei=0;
                                n3++;
                                insertAt(pHeader3,temp+'0',n3);
               }
               for(i=n2;i<n1;i++)
               {
                                 temp=getAt(pHeader1,n1-i)+jinwei;
                                 if(temp>=10)
                                 {
                                             temp=temp-10;
                                             jinwei=1;
                                 }
                                 else jinwei=0;
                                 n3++;
                                 insertAt(pHeader3,temp+'0',n3);
               }
               if(jinwei==1)
               {
                            n3++;
                            insertAt(pHeader3,'1',n3);
               }
      }
      else
      {
          struct node*ptemp;
          int ntemp;
          ptemp=pHeader1;
          pHeader1=pHeader2;
          pHeader2=ptemp;
          ntemp=n1;
          n1=n2;
          n2=ntemp;
          for(i=0;i<n2;i++)
               {
                                temp=getAt(pHeader1,n1-i)+getAt(pHeader2,n2-i)+jinwei;
                                if(temp>=10)
                                {
                                             temp=temp-10;
                                             jinwei=1;
                                }
                                else jinwei=0;
                                n3++;
                                insertAt(pHeader3,temp+'0',n3);
               }
               for(i=n2;i<n1;i++)
               {
                                 temp=getAt(pHeader1,n1-i)+jinwei;
                                 if(temp>=10)
                                 {
                                             temp=temp-10;
                                             jinwei=1;
                                 }
                                 else jinwei=0;
                                 n3++;
                                 insertAt(pHeader3,temp+'0',n3);
               }
               if(jinwei==1)
               {
                            n3++;
                            insertAt(pHeader3,'1',n3);
               }
      }
      int jilu=0;
      if(n3==1&&getAt(pHeader3,n3)==0) printf("0");
      else
      {
       for(i=0;i<n3;i++)
       {
                       if(getAt(pHeader3,n3-i)==0&&jilu==0) continue;
                       else
                       {
                           jilu=1;
                           printf("%d",getAt(pHeader3,n3-i));
                       }
       }
      }
      }


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 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;
}


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 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 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[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';
}


int main()
{

const int MAX=210;

int num1[MAX]={0};
int num2[MAX]={0};
int ans[MAX]={0};
char input1[MAX]={NULL};
char input2[MAX]={NULL};

	cin>>input1>>input2;

	int len1=strlen(input1);
	int len2=strlen(input2);

	int longerlength=0;
	if(len1>len2)
		longerlength=len1;
	else
		longerlength =len2;

	int j=0;
	for(int i= len1-1; i>=0; i--)
	{
		num1[j]=input1[i]-'0';
		j++;

	}
	j=0;

	for(int i= len2-1; i>=0; i--)
	{
		num2[j]=input2[i]-'0';
		j++;

	}

	for(int i=0; i<longerlength; i++)
	{
		ans[i]= ans[i]+num1[i]+num2[i];

		if(ans[i]>=10)
		{
			ans[i]=ans[i]%10;
			ans[i+1]++;

		}
	}

	int start=0;

	for(int i=MAX-1; i>=0; i--)
	{
			if(start==1)
			cout<<ans[i];
		if(ans[i]>0 && start == 0)
		{
			cout<<ans[i];
			start=1;
		}

	if(i==0 && start==0)
		cout<<0;

	}

return 0;

}


int main()
{
	char ch1[300];
	char ch2[300];
	char ch3[300];
	int l1=0,l2=0;
	int min_l=0;
	int max_l=0;
	int jinwei=0;
	int number=0;

	ch1[0]='0';
	ch2[0]='0';
	int i=0,k=0;

	scanf("%s",&ch1[1]);
	scanf("%s",&ch2[1]);
	l1=strlen(ch1);
	l2=strlen(ch2);

	min_l=l1>l2?l2:l1;
	max_l=l1>l2?l1:l2;
	if(l1>l2){strcpy(ch3,ch1);}
	else
	{
		strcpy(ch3,ch2);
	}

	for(i=1;i<=min_l||jinwei==1;i++)
	{
		if(!jinwei)
		{
			if(i>min_l)break;
			if((number=ch1[l1-i]+ch2[l2-i]-'0'-'0')<10)
			{
				ch3[max_l-i]=number+'0';
				jinwei=0;
			}
			else
			{
				ch3[max_l-i]=number-10+'0';
				jinwei=1;
			}
		}
		else
		{
			if(i>min_l)
			{
				if((number=ch3[max_l-i]-'0'+1)<10)
				{
					ch3[max_l-i]=number+'0';
					jinwei=0;
				}
				else
				{
					ch3[max_l-i]=number-10+'0';
					jinwei=1;
				}
				continue;
			}
			if((number=ch1[l1-i]+ch2[l2-i]-'0'-'0'+1)<10)
			{
				ch3[max_l-i]=number+'0';
				jinwei=0;
			}
			else
			{
				ch3[max_l-i]=number-10+'0';
				jinwei=1;
			}
		}
	}

	for(i=0;i<=max_l;i++)
	{
		if(ch3[i]!='0')break;
	}

	if(!(i>=max_l))
	{
		for(k=i;k<=max_l;k++)
		{
			if(ch3[k]!='\0')
			{
				printf("%c",ch3[k]);
			}
		}
	}
	else
	{
		printf("0");
	}

	return 0;
}


int birev(char * s, int * sr)
{
	int i, len=strlen(s);
	for (i=0; s[i]; i++) sr[len-1-i]=s[i]-'0';
	return len;
}
int bisum(int * ar, int alen, int * br, int blen, int * sum)
{
	int len=(alen>blen)?alen:blen;
	int i, temp=0;
	for (i=0; i<len; i++) {
		sum[i]=(ar[i]+br[i]+temp)%10;
		temp=(ar[i]+br[i]+temp)/10;
	}
	if(temp!=0) {
		sum[i]=1;
		len++;
	}
	return len;
}
void biprt(int * sum, int sumlen)
{
	while (sum[sumlen-1]==0&&sumlen>1) sumlen--;
	while (sumlen) {
		printf("%d", sum[sumlen-1]);
		sumlen--;
	}
}
int main ()
{
	char a[300], b[300];
	int ar[300]={0}, br[300]={0}, sum[300];
	int alen, blen, sumlen;
	gets(a);
	gets(b);
	alen=birev(a, ar);
	blen=birev(b, br);
	sumlen=bisum(ar, alen, br, blen, sum);
	biprt(sum, sumlen);
	return 0;
}


int shift(char n){
	int shift;
	switch(n){
		case'1':shift=1;break;
		case'2':shift=2;break;
		case'3':shift=3;break;
		case'4':shift=4;break;
		case'5':shift=5;break;
		case'6':shift=6;break;
		case'7':shift=7;break;
		case'8':shift=8;break;
		case'9':shift=9;break;
		case'0':shift=0;break;
	}
	return shift;
}

int main(){
	char a[252],b[252],c[252],d[252];
	int lengtha,lengthb,sum[252],lon,i,lina,linb,cha,sh;
	d[0]='0';
	d[1]='\0';
	scanf("%s%s",a,b);
	lengtha=strlen(a);
	lengthb=strlen(b);
	for(lina=0;lina<lengtha;lina++){
		if(a[lina]!='0')break;
	}
	lina;
	for(linb=0;linb<lengthb;linb++){
		if(b[linb]!='0')break;
	}
	linb;

	if(lengtha-lina>=lengthb-linb){
		cha=(lengtha-lina)-(lengthb-linb);
		for(i=0;i<=cha;i++){
			c[i]='0';
		}
		c[cha+1]='\0';
		strcat(c,b);
		strcat(d,a);
		lon=lengtha;
		sh=lina;
	}
	else{
		cha=(lengthb-linb)-(lengtha-lina);
		for(i=0;i<=cha;i++){
			c[i]='0';
		}
		c[cha+1]='\0';
		strcat(c,a);
		strcat(d,b);
		lon=lengthb;
		sh=linb;
	}
	sum[lon]=0;
	for(i=lon;i>sh;i--){
		sum[i-1]=0;
		sum[i]=shift(d[i])+shift(c[i])+sum[i];
		if(sum[i]>=10){
			sum[i]-=10;
			sum[i-1]++;
		}
	}
	if(sh==0){
		if(sum[0]==1)printf("1");
	    for(i=1;i<=lon;i++)printf("%d",sum[i]);
	    printf("\n");
	}
	else{
	if(sum[sh-1]==1)printf("1");
	for(i=sh;i<=lon;i++)printf("%d",sum[i]);
	printf("\n");
	}
	return 0;
}


	char num_1[200]={0},num_2[200]={0};
	int i,j,k;
	int num1[200]={0},num2[200]={0},num3[200]={0};
int Greater(int a,int b)
{
	if(a>b)
		return a;
	return b;
}
void print (int len)
{
	for(i=len;i>=0;i--)
	{
		cout<<num3[i];
	}
}
void addition(int len)
{
	for(i=0;i<len;i++)
	{
		num3[i]=num1[i]+num2[i]+num3[i];
		num3[i+1]+=num3[i]/10;
		num3[i]=num3[i]%10;
	}
	int temp=len;
	for(i=len;i>0;i--)
	{
	if(num3[i]==0)
		temp=i-1;
	else
		break;
	}
	print(temp);

}
int main()
{

	cin>>num_1;
	cin>>num_2;
	for(i=0;i<strlen(num_1);i++)
	{
		num1[i]=num_1[strlen(num_1)-1-i]-'0';

	}

	for(i=0;i<strlen(num_2);i++)
	{
		num2[i]=num_2[strlen(num_2)-1-i]-'0';

	}

	int len=Greater(strlen(num_1),strlen(num_2));
	addition(len);

	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]);
	}
}
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]>=10)
		{
			c[i+1]+=c[i]/10;
			c[i]%=10;
		}
	}
	return c[len]?(len+1):len;
}
int main()
{
	char s1[256],s2[256];
	int a[256],b[256],c[256];
	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;
}


//#include <string.h>
char * strrev(char * a){
     char *end;
	 char *beg = a ;
	 char temp;
	 for(end = a; *end; end++);
	 for(end--;beg < end;)
	{
		temp = *beg;
		*beg = *end;
		*end = temp;
		beg++;
        end--;
	}
	return a;
}
int main()
{
	char a[500],b[500] ;
	char *p;
	scanf("%s",a);
	scanf("%s",b);

	strrev(a);
	strrev(b);

	for(p = a; *p; p++)
		*p = *p - '0';
	for(;p<a+500;p++)
		*p = 0;
	for(p = b; *p; p++)
		*p = *p - '0';
	for(;p<b+500;p++)
		*p = 0;
	int i;
	for(i = 0; i < 500; i++)
	{
		a[i] = a[i] + b[i];
		a[i+1] += a[i]/10;
		a[i] = a[i] % 10;
	}

	for(p = a + 400; *p == 0 && p>=a; p--);
	if(p < a)
	printf("0");
	for(;p>=a; p--)
		printf("%d",(int)*p);
	printf("\n");
	//scanf("%s",a);
	return 0;
}


main(){
       int a[255];
       int b[255];
       int c[255];
       memset(a,0,sizeof(a));
       memset(b,0,sizeof(b));
       memset(c,0,sizeof(c));
       char str[255];
       int len1,len2;
       cin >> str;
       len1 = strlen(str);
       for(int i = 0; i < len1; i++){
               a[len1 - 1 - i] = str[i] - '0';
       }
       cin >> str;
       len2 = strlen(str);
       for(int i = 0; i < len2; i++){
               b[len2 - 1 - i] = str[i] - '0';
       }
       if(len1 > len2){len2 = len1;}
       for(int i = 0; i < len2; i++){
               c[i] = a[i] + b[i];
       }
       for(int i = 0; i < len2; i++){
               if(c[i] >= 10){
                       c[i + 1] += c[i] / 10;
                       c[i] %= 10;
               }
       }
       for(int i = len2; i >= 0; i--){
               if(c[i] != 0){
                       len2 = i;
                       break;
               }
               if(i == 0){len2 = -1;}
       }
       if(len2 < 0){cout << "0" << endl;return 0;}
       for(int i = len2; i >= 0; i--){
               cout << c[i];
       }
       cout << endl;
}


/*
 * dshw1.cpp
 *
 *  Created on: 2013-3-16
 *      Author: ibm
 */

struct Addlist
{
	int n;
	int *element;
};

typedef struct Addlist *ablist;

ablist creatalist(void)
{
	ablist alist = (ablist)malloc(sizeof(struct Addlist));
	if(alist != NULL)
	{
		alist -> element = (int*)malloc(sizeof(int)*MAXNUM);
		if (alist -> element)
		{
			alist ->n = 0;
			return alist;
		}
		else delete(alist);
	}
	return NULL;
}

ablist creatblist(void)
{
ablist blist = (ablist)malloc(sizeof(struct Addlist));
	if(blist != NULL)
	{
		blist -> element = (int*)malloc(sizeof(int)*MAXNUM);
		if (blist -> element)
		{
			blist ->n = 0;
			return blist;
		}
		else delete(blist);
	}
}

int main()
{
	int i,j,k;
	int lena,lenb,len;
	int carry = 0;

ablist alist = creatalist();
ablist blist = creatblist();

char achar[MAXNUM];
cin>>achar;
//cout<<achar<<endl;
lena = strlen(achar);
//cout<<lena<<endl;

char bchar[MAXNUM];
cin>>bchar;
//cout<<bchar;
lenb = strlen(bchar);
//cout<<lenb<<endl;

//if( (achar[0]-'0' ==0 )&& (bchar[0]-'0'==0))
//{
	//cout<<"flag"<<endl;
//	cout<<'0';
//return 0;}
for( i=0; i<lena; i++)
{
	alist -> element[i] = achar[lena - i - 1] - '0';
	//cout<<i<<' '<<alist -> element[i] ;
}
for( i=lena; i<MAXNUM; i++)
{
	alist -> element[i] = 0;
	//cout<<i<<' '<<alist -> element[i] ;
}
for( j=0; j<lenb; j++)
{
	blist -> element[j] = bchar[lenb - j - 1] - '0';
	//cout<<j<<' '<<blist -> element[j] ;
}
for( j=lenb; j<MAXNUM; j++)
{
	blist -> element[j] = 0;
	//cout<<j<<' '<<blist -> element[j] ;
}
//for (i=lena-1; i>=0; i--)
//cout<<"a "<<alist->element[i]<<endl;
//cout<<endl;
//for (i=lenb-1; i>=0; i--)
//cout<<"b "<<blist->element[i]<<endl;;

	//int len;
	if (lena <= lenb)
	len = lenb;
	else
		len = lena;
	//cout<<"len "<<len<<endl;

for (k=0; k<len; k++)
{
	alist -> element[k] = alist -> element[k] + blist -> element[k] + carry;
	//cout<<k<<' '<<alist -> element[k]<<endl;
	if (alist -> element[k] >= 10)
	{
		alist -> element[k] -= 10;
		carry = 1;
	}
	else carry = 0;
	//cout<<k<<' '<<alist -> element[k]<<endl;
	//cout<<carry<<endl;
}
if (carry == 1)
{
	alist -> element[len] = 1;

//for (i=lena; i>=0; i--)
//{//cout<<"aaaa ";
//cout<<alist->element[i];}
//cout<<' '<<endl;
//if (carry == 1)
//{
	//cout<<"1";

	for (i=len; i>=0; i--)
		cout<<alist -> element[i];
	return 0;
}
else
{
	j = 0;
	for (i=len-1; i>=0; i--)
	{
		if (alist -> element[i] == 0)
		{
			j++;
		}
		else
			break;
	}
	//cout<<"  "<<j<<endl;
		//else
	if (j != len)
		for( k=len-1-j; k>=0; k--)
		{
			//cout<<j<<endl;
			cout<<alist -> element[k];
		}
	else
		cout<<"0"<<endl;
		return 0;
}
}
	//else
	//	for (i=len-1; i>=0; i--)
	///	{
//j = 0;
		//	if (alist -> element[i] = 0)
	///			j++;
	//		for( k=len-1-j; k>=0; k--)
	//	{
	//		cout<<alist -> element[k];
			//i--;
//		}
	//		return 0;
	//	}


int a[300],aw;
int b[300],bw;
int c[300],cw;
int main(){
	char tp[300];
	cin>>tp;
	for(int i=1;i<=strlen(tp);i++){
		a[i]=tp[strlen(tp)-i]-48;

	}
	aw=strlen(tp);
	cin>>tp;
	for(int i=1;i<=strlen(tp);i++){
		b[i]=tp[strlen(tp)-i]-48;
	}
	bw=strlen(tp);

	int max=aw>bw?aw:bw;
	c[1]=0;
	for(int i=1;i<=max;i++){
		c[i+1]=0;
		c[i]=c[i]+a[i]+b[i];
		c[i+1]=c[i]/10;
		c[i]=c[i]%10;
	}
	cw=1;
	for(int i=max+5;i>=1;i--){
		if(c[i]!=0){
			cw=i;
			break;
		}
	}
	for(int i=0;i<cw;i++){
		cout<<c[cw-i];
	}
}


typedef int data;
struct node;
typedef struct node* pnode;
struct node
{
  data value;
  pnode pnext;
};
void node_create(pnode *pheader,int l,char a[length],int max)
{
  pnode p=*pheader;
  p->pnext=NULL;
  for(int i=0;i<l;i++)
  {
     pnode pnew=(pnode)malloc(sizeof (struct node));
     pnew->value=a[i]-'0';
     pnew->pnext=p->pnext;
     p->pnext=pnew;
     p=*pheader;
  }
  for(int i=0;i<l;i++) p=p->pnext;
  for(int i=l-1;i<=max;i++)
  {
     pnode pnew=(pnode)malloc(sizeof (struct node));
     pnew->value=0;
     pnew->pnext=p->pnext;
     p->pnext=pnew;
     p=p->pnext;
  }
}
void node_plus(pnode pheader1,pnode pheader2,pnode* pheader3,int max)
{
   int sum,num=0;
   pnode p1=pheader1->pnext;
   pnode p2=pheader2->pnext;
   pnode p3=(*pheader3)->pnext;
   for(int i=0;i<=max;i++)
   {
         sum=p1->value+p2->value+num;
         if(sum<10) {p3->value=sum;num=0;}
         else {p3->value=sum-10;num=1;}
         p1=p1->pnext;
         p2=p2->pnext;
         p3=p3->pnext;
   }
}
void node_delete(pnode pheader)
{
   pnode p=pheader->pnext;
   pnode ptemp;
   while(p!=NULL)
   {
      ptemp=p;
      p=p->pnext;
      free(ptemp);
   }
   pheader->pnext=NULL;
}
void output(pnode pheader3,int l)
{
  int t;
  pnode p=pheader3;
  int a[length]={0};
  for(int i=0;i<l;i++)
  {p=p->pnext;a[i]=p->value;}
  for(int i=l-1;i>=0;i--) {if(a[i]!=0) {t=i;break;}}
  for(int i=t;i>=0;i--) {printf("%d",a[i]);}
}
main()
{
   struct node header1,header2,header3;
   pnode pheader1=&header1;
   pnode pheader2=&header2;
   pnode pheader3=&header3;
   int l1,l2;
   int max;
   char a1[length]={'\0'},a2[length]={'\0'},a3[length+1]={'\0'};
   for(int i=0;i<length+1;i++) {a3[i]='0';}

   gets(a1);
   l1=strlen(a1);
   gets(a2);
   l2=strlen(a2);
   if(l1>=l2) max=l1+1;
   else max=l2+1;
   node_create(&pheader1,l1,a1,max);
   node_create(&pheader2,l2,a2,max);
   node_create(&pheader3,max,a3,max);
   node_plus(pheader1,pheader2,&pheader3,max);
   output(pheader3,max);
   node_delete(pheader1);
   node_delete(pheader2);
   node_delete(pheader3);
   getchar();
   getchar();
}


const int maxn = 250 + 10;

int a[maxn], b[maxn], c[maxn];
int la, lb, lc;
char s[maxn], t[maxn];

int main()
{
    //freopen("8.in", "r", stdin);

    while (scanf("%s%s",  s, t) != EOF)
    {
          int la = strlen(s);
          int lb = strlen(t);
          memset(a, 0, sizeof(a));
          memset(b, 0, sizeof(b));
          memset(c, 0, sizeof(c));
          for (int i = 0; i < la; i ++)
              a[la - i - 1] = s[i] - '0';
          for (int i = 0; i < lb; i ++)
              b[lb - i - 1] = t[i] - '0';
          while (a[la - 1] == 0 && la > 1)
                la --;
          while (b[lb - 1] == 0 && lb > 1)
                lb --;
          if (la > lb)
             lc = la;
          else lc = lb;
          int add = 0;
          for (int i = 0; i < lc;i ++)
          {
              c[i] = (add + a[i] + b[i]) % 10;
              add = (add + a[i] + b[i]) / 10;
          }
          if (add != 0)
             c[lc ++] = add;
          for (int i = lc - 1; i >= 0; i --)
              printf("%d", c[i]);
          printf("\n");
    }

    //while (1);
}


int main()
{
 	const int MAX_LEN=200;
	unsigned an1[MAX_LEN];
	unsigned an2[MAX_LEN];
	char seLine1[MAX_LEN+1];
	char seLine2[MAX_LEN+1];
	cin.getline(seLine1,MAX_LEN+1);
	cin.getline(seLine2,MAX_LEN+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<MAX_LEN;i++)
	{
		an1[i]+=an2[i];
		if(an1[i]>=10)
		{
			an1[i]-=10;
			an1[i+1]++;
		}
	}
	i=MAX_LEN-1;
	while(an1[i]==0) i--;
	if(i>=0)
	{
	for(;i>=0;i--)
		cout<<an1[i];
	}
	else cout<<0;
	cout<<endl;
	return 0;
}


int main()
{
	char a1[260];
	char a2[260];

	char result[260];

	cin>>a1>>a2;

	int len1=strlen(a1);
	int len2=strlen(a2);

	memset(result,0,sizeof(result));
	int i=len1-1;
	int j=len2-1;
	int k=0;

	while(i>=0 && j>=0)
	{
		result[k]+=a1[i]+a2[j]-'0';
		if(result[k]>'9')
		{
			result[k+1]++;
			result[k]-=10;
		}
		i--;
		j--;
		k++;
	}
	if(i>=0)
	{
		while(i>=0)
		{
			result[k]+=a1[i];
			if(result[k]>'9')
			{
				result[k+1]++;
				result[k]-=10;
			}
			i--;
			k++;
		}
	}
	if(j>=0)
	{
		while(j>=0)
		{
			result[k]+=a2[j];
			if(result[k]>'9')
			{
				result[k+1]++;
				result[k]-=10;
			}
			j--;
			k++;
		}
	}

	if(result[k]!=0)
	{
		result[k]+='0';
		k++;
	}

	while(result[k-1]=='0' && k!=1)
		k--;

	char final[260];
	memset(final,0,sizeof(final));

	for(i=0;i<k;i++)
		final[i]=result[k-1-i];

	cout<<final<<endl;

}


int str2bigint(char*str,int*a){
	int len=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]);
	}
}
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]=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]%=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 main()
{
	int yu=0,yu0=0,he=0,i,n,sum;
	char str1[260],str2[260],str0[260],stra[260],strb[260],res[260];

	scanf("%s%s",str1,str2);

	if (strlen(str1)==strlen(str2))
	{
		strcpy(stra,str1);
		strcpy(strb,str2);
		goto final;
	}
	if (strlen(str1)>strlen(str2))
	{
		strcpy(stra,str1);
		strcpy(str0,str2);
	}
	else
	{
		strcpy(stra,str2);
		strcpy(str0,str1);
	}                           //???stra??????str0?????strb??0???str0???final??

	n=strlen(stra)-strlen(str0);
	for (i=0;i<=n-1;i++)
		strb[i]='0';
	strb[n]='\0';
	strcat (strb,str0);        //???stra?strb?????????

final:

	i=strlen(stra)-1;
	for (i=i;i>=0;i--)
	{
		he=stra[i]+strb[i]-'0'-'0'+yu;
		yu0=he/10;
		if (he/10!=0)
			he=he%10;
		res[i+1]=he+'0';
		yu=yu0;
	}
	res[strlen(stra)+1]='\0';
	res[0]=yu+48;                     //res?????????0

	for (i=0;i<=strlen(stra);i++)
	{
		sum=i;
		if (res[i]!='0')
			break;
	}
	for (i=sum;i<=strlen(stra);i++)
		printf("%c",res[i]);

	return 0;
}


struct num
{
    int n;
    struct num* next;
    struct num* ahead;
};
struct num* phead1;       //????
struct num* phead2;       //????
struct num* phead3;       //????
struct num* p1;
struct num* p2;
void create(struct num** phead,int n)//???????????
{
    int i=0;
    p1=(struct num*)malloc(sizeof(struct num));
    p1->n=0;
    *phead=p2=p1;
    (*phead)->ahead=NULL;
    for(i=0;i<=n-2;i++)
    {
        p1=(struct num*)malloc(sizeof(struct num));
        p1->n=0;
        if(i==0)
        {
            (*phead)->next=p1;
            p1->ahead=(*phead);
        }
        else
        {
            p2->next=p1;
            p1->ahead=p2;
        }
        p2=p1;
    }
    p2->next=NULL;
}

int main()
{
    char num1[10000];
    char num2[10000];
    //printf("Please input the first integer\n");
    scanf("%s",num1);
    //printf("Please input the next integer\n");
    scanf("%s",num2);
    if(num1[0]!='-'&&num2[0]!='-')
    {
        int i1=0;
        int i2=0;
        int max;
        while(num1[i1]!='\0')
        {
            i1++;
        }
        while(num2[i2]!='\0')
        {
            i2++;
        }
        if(i1>=i2)
        {
            max=i1;
        }
        else
        {
            max=i2;
        }                         //????????????????
        create(&phead1,max);      //?????????max?max?max+1???
        create(&phead2,max);
        create(&phead3,max+1);
        struct num* ptemp1=phead1;
        struct num* ptemp2=phead2;
        int i3;
        for(i3=i1-1;i3>=0;i3--)
        {
            ptemp1->n=num1[i3]-'0';
            ptemp1=ptemp1->next;
        }
        int i4;
        for(i4=i2-1;i4>=0;i4--)
        {
            ptemp2->n=num2[i4]-'0';
            ptemp2=ptemp2->next;
        }                         //????????????
        struct num* ptemp3=phead1;
        struct num* ptemp4=phead2;
        struct num* ptemp5=phead3;
        while(ptemp3!=NULL)
        {
            if(((ptemp3->n)+(ptemp4->n)+(ptemp5->n))>=10)
            {
                 ptemp5->n=ptemp5->n+((ptemp3->n)+(ptemp4->n))-10;
                 ptemp3=ptemp3->next;
                 ptemp4=ptemp4->next;
                 ptemp5=ptemp5->next;
                 ptemp5->n=(ptemp5->n)+1;
            }
           else
           {
               ptemp5->n=ptemp5->n+(ptemp3->n)+(ptemp4->n);
               ptemp3=ptemp3->next;
               ptemp4=ptemp4->next;
               ptemp5=ptemp5->next;
           }
        }                       //???????????????????????
        struct num* ptemp7=phead3;
        while(ptemp7->next!=NULL)
        {
            ptemp7=ptemp7->next;
        }
        //printf("the answer is:\n");
        if(ptemp7->n==0)
        {
            ptemp7=ptemp7->ahead;
            if(ptemp7->ahead==NULL)
            {
                printf("0");
                return 0;
            }
            else
            {
                while(ptemp7->n==0)
                {
                    ptemp7=ptemp7->ahead;
                }
                while(ptemp7!=NULL)
                {
                    printf("%d",ptemp7->n);
                    ptemp7=ptemp7->ahead;
                }
            }
        }
        else
        {
            while(ptemp7!=NULL)
            {
                printf("%d",ptemp7->n);
                ptemp7=ptemp7->ahead;
            }
        }

    }
    struct num* release1=phead1;//???????free???
    struct num* release2=phead2;
    struct num* release3=phead3;
    while(phead1->next!=NULL)
    {
        release1=phead1;
        phead1->next=(phead1->next)->next;
        free(release1->next);
    }
    free(phead1);
    while(phead2->next!=NULL)
    {
        release2=phead2;
        phead2->next=(phead2->next)->next;
        free(release2->next);
    }
    free(phead2);
    while(phead3->next!=NULL)
    {
        release3=phead3;
        phead3->next=(phead3->next)->next;
        free(release3->next);
    }
    free(phead3);
    return 0;
}


int main()
{
   const int maxlen=250;
   int an1[maxlen],an2[maxlen];
   char str1[maxlen+1],str2[maxlen+1];
   cin.getline(str1,maxlen+1);
   cin.getline(str2,maxlen+1);
   int len1=strlen(str1);
   int len2=strlen(str2);
   if(len1==1&&len2==1&&str1[0]=='0'&&str2[0]=='0')
	   cout<<0<<endl;
   else
  { memset(an1,0,sizeof(an1));
   memset(an2,0,sizeof(an2));
   int i,j=0;
   for(int i=len1-1;i>=0;i--)
	   an1[j++]=str1[i]-'0';
   j=0;
    for(int i=len2-1;i>=0;i--)
	   an2[j++]=str2[i]-'0';
	for(int i=0;i<maxlen;i++)
	{
		an1[i]=an1[i]+an2[i];
		if(an1[i]>9)
		{
			an1[i]=an1[i]-10;
			an1[i+1]++;
		}
	}
	i=maxlen-1;
	while(an1[i]==0)
		i--;
	for(;i>=0;i--)
		cout<<an1[i];
	cout<<endl;
   }
return 0;
}


char input1[260],input2[260];
int int1[260],int2[260],len1,len2;
void sum(int index, int carry){
	if(carry == 0 && index >= len1 && index >= len2)
		return ;
	int1[index] += int2[index] + carry;
	carry = int1[index] / 10;
	int1[index] %= 10;
	sum(index + 1, carry);
	return ;
}
int main(){
	cin >> input1 >> input2;
	memset(int1,0,sizeof(int1));
	memset(int2,0,sizeof(int2));
	int i,j;
	len1 = strlen(input1);
	for(i=len1-1,j=0;i>=0;i--,j++)
		int1[j] = input1[i]-'0';
	len2 = strlen(input2);
	for(i=len2-1,j=0;i>=0;i--,j++)
		int2[j] = input2[i]-'0';
	sum(0, 0);
	for(i = len1>len2?len1:len2;i >= 0;i --)
		if(int1[i] != 0)
			break;
	if(i < 0)
		cout << 0;
	else{
		for(;i >= 0;i--)
			cout << int1[i];
	}
	return 0;
}


int main()
{
	char ca[251];
	char cb[251];
	char tempc;
	int ia[251] = {0};
	int ib[251] = {0};
	int result[251] = {0};
	int numa = 0;
	int numb = 0;
	int jinwei = 0;
	int weishu = 0;
	int resultweishu = 0;
	cin >> ca;
	cin >> cb;
	numa = strlen(ca);
	numb = strlen(cb);
	//cout << numa << " " << numb << endl;
	memset(ia,0,sizeof(int));
	memset(ib,0,sizeof(int));
	memset(result,0,sizeof(int));
	if(numa > numb)
		weishu = numa;
	else
		weishu = numb;
	for(int i = 0;i < numa;i ++)
	{
		tempc = ca[numa - i - 1];
		ia[i] = atoi(&tempc);
	}
	for(int i = 0;i < numb;i ++)
	{
		tempc = cb[numb - i - 1];
		ib[i] = atoi(&tempc);
	}
	for(int i = 0;i <= weishu;i ++)
	{
		result[i] = ia[i] + ib[i] + jinwei;
		if(result[i] > 9)
		{
			result[i] = result[i] - 10;
			jinwei = 1;
		}
		else
			jinwei = 0;
	}
	for(int i = 250;i >= 0;i --)
	{
		if(result[i] != 0)
		{
			resultweishu = i;
			break;
		}
	}
	for(int i = resultweishu;i >= 0; i --)
		cout << result[i];
	cout << endl;
}

/*#include<iostream>

int mycmp(const void *a, const void *b)
{
	return *(int *)a - *(int *)b;
}

int main()
{
	int n = 0;
	cin >> n;
	int tianji[1000] = {0};
	int qiwang[1000] = {0};
	int isusedt[1000] = {0};
	int isusedq[1000] = {0};
	int tempt = 0;
	int tempq = 0;
	while(n != 0)
	{
		memset(tianji,0,sizeof(int));
		memset(qiwang,0,sizeof(int));
		memset(isusedt,0,sizeof(int));
		memset(isusedq,0,sizeof(int));
		tempt = 0;
		tempq = 0;
		for(int i = 0;i < n;i ++)
			cin >> tianji[i];
		for(int i = 0;i < n;i ++)
			cin >> qiwang[i];
		qsort(tianji,n,sizeof(int),mycmp);
		qsort(qiwang,n,sizeof(int),mycmp);
		for(int i = tempt;i < n;i ++)
		{
		}
		cin >> n;
	}
	return 0;
}*/


int main()
{
	const int maxlen = 202;
	char szline1[maxlen];
	char szline2[maxlen];
	int an1[maxlen];
	int an2[maxlen];
	gets(szline1);
	gets(szline2);
	int len1 = strlen(szline1);
	int len2 = strlen(szline2);
	memset(an1, 0, sizeof (an1));
	memset(an2, 0, sizeof(an2));
	for (int i = len1 - 1, j = 0; i >= 0; i --)
		an1[j ++] = szline1[i] - '0';
	for (int i = len2 - 1, j = 0; i >= 0; i --)
		an2[j ++] = szline2[i] - '0';
	int begin;
	for (int i = 0; i < maxlen - 1; i ++)
	{
		an1[i] += an2[i];
		if (an1[i] >= 10)
		{
			an1[i] -= 10;
			an1[i + 1] ++;
		}
		if (an1[i])
			begin = i;
	}
	for (int i = begin; i >= 0; i --)
		printf("%d", an1[i]);

	return 0;
}


int main()
{
	int i,r,j=0;
	int A,B,C,D;
	int counta=0,countb=0;
	char a[250],b[250],c[250];
	char num[10]={'0','1','2','3','4','5','6','7','8','9'};
	gets(a);
	gets(b);
	for(i=0;a[i];i++) counta++;
	for(i=0;b[i];i++) countb++;
	if(counta>=countb)
	{
		for(i=counta-1;i>=(counta-countb);i--) b[i]=b[i-counta+countb];
		for(i=0;i<(counta-countb);i++) b[i]='0';
	}
    if(counta<countb)
	{
		for(i=countb-1;i>=(countb-counta);i--) a[i]=a[i-countb+counta];
		for(i=0;i<(countb-counta);i++) a[i]='0';
		counta=countb;
	}
    for(i=0;i<=counta;i++) c[i]='0';
    for(i=counta-1;i>=0;i--)
	{
		A=a[i]-'0';
		B=b[i]-'0';
		C=A+B;
		D=c[i+1]-'0';
		if(C+D<10)
			c[i+1]=num[C+D];
		else
		{
			c[i]='1';
			c[i+1]=num[C+D-10];}
		}
		for(i=0;i<=counta;i++)
			if(c[i]=='0') j++;
		if(j==counta+1) printf("0\n");
		else
		{
			for(i=0;i<=counta;i++)
			{
				if(c[i]!='0')
				{
					r=i;
					break;
				}
			}
			for(i=r;i<=counta;i++) printf("%c",c[i]);
		}
		printf("\n");
	return 0;
}


int an1[MAX_LEN+10];
int an2[MAX_LEN+10];
char szLine1[MAX_LEN+10];
char szLine2[MAX_LEN+10];

int main()
{
    scanf("%s", szLine1);
    scanf("%s", szLine2);
    int i, j;
    memset( an1, 0, sizeof(an1));
    memset( an2, 0, sizeof(an2));
     int nLen1 = strlen( szLine1);
     j = 0;
     for( i = nLen1 - 1;i >= 0 ; i --)
          an1[j++] = szLine1[i] - '0';

     int nLen2 = strlen(szLine2);
     j = 0;
     for( i = nLen2 - 1;i >= 0 ; i--)
          an2[j++] = szLine2[i] - '0';

     for( i = 0;i < MAX_LEN ; i ++ )
     {
         an1[i] += an2[i];
         if( an1[i] >= 10 )
         {
                 an1[i] -= 10;
                 an1[i+1] ++;
         }
     }

     char bStartOutput = false;
     for( i = MAX_LEN; i >= 0; i-- )
     {
          if( bStartOutput)
              printf("%d", an1[i]);
          else if( an1[i] ) {
               printf("%d", an1[i]);
               bStartOutput = true;
          }
     }
     if(!bStartOutput)
          printf("0");

     return 0;
}


char inputA[260], inputB[260];
int a[260] = {0}, b[260] = {0};

int main() {
	cin.getline(inputA, 260);
	cin.getline(inputB, 260);

	int alen = strlen(inputA), blen = strlen(inputB);
	for(int i = alen - 1, j = 0; i >= 0; i --, j ++)
		a[j] = inputA[i] - '0';
	for(int i = blen - 1, j = 0; i >= 0; i --, j ++)
		b[j] = inputB[i] - '0';

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

	int index = 0;
	for(int i = 259; i >= 0; i--)
		if(b[i] > 0) {
			index = i;
			break;
		}

	for(int i = index; i >= 0; i --)
		cout << b[i];
	cout << endl;
	return 0;
}


int strReverse(char *str)
{
	int len = strlen(str);
	for (int i = 0; i<len / 2; i++)
	{
		char temp=str[i];
		str[i] = str[len - i-1];
		str[len - i-1] = temp;
	}
	return len;
}

int addBig(char *l, int lLen, char*s, int sLen, int *c)
{
	for (int i = 0; i < lLen; i++)
	{
		if (i < sLen)
		{
			c[i] = c[i] + l[i] - '0' + s[i] - '0' ;
			c[i + 1] = c[i] / 10;;
			c[i] %= 10;
		}
		else
		{
			c[i] = c[i] + l[i] - '0';
			c[i + 1] = c[i] / 10;
			c[i] %= 10;
		}
	}
	return c[lLen] ? (lLen + 1) : lLen;
}

void printBig(int *a, int len)
{
	int k = len - 1;
	while (a[k] == 0 && k > 0)
	{
		k--;
	}
	for (int i = k; i >= 0; i--)
	{
		cout << a[i];
	}
	cout << endl;
}

int main()
{
	char a[MAX], b[MAX];
	cin.getline(a, MAX);
	cin.getline(b, MAX);
	int aLen, bLen, cLen;
	aLen = strReverse(a);
	bLen = strReverse(b);
	int c[MAX] = { 0 };
	cLen = (aLen > bLen) ? addBig(a, aLen, b, bLen, c):addBig(b,bLen,a,aLen,c);
	printBig(c, cLen);
	return 0;
}


//
//  Created by Chu-Pan,Wong on Dec 3, 2013.
//  Copyright (c) 2013 ChuPan,Wong. All rights reserved.
//

int a[250];
int b[250];
char num[251];

int main(int argc, char** argv){
    scanf("%s", num);
    int aa = (int)strlen(num);
    for (int i=0; i<aa; i++) {
        a[i] = num[aa-1-i]-'0';
    }
    scanf("%s", num);
    int bb = (int)strlen(num);
    for (int i=0; i<bb; i++) {
        b[i] = num[bb-1-i]-'0';
    }
    for (int i=0; i<250; i++) {
        a[i] = a[i]+b[i];
        if (a[i]>9) {
            a[i+1]++;
            a[i]-=10;
        }
    }
    for (int i=0; i<250; i++) {
        if (a[i]>9) {
            a[i+1]++;
            a[i]-=10;
        }
    }
    int max=0;
    for (int i=249; i>=0; i--) {
        if(a[i]!=0){
            max = i;
            break;
        }
    }
    for (int i=max; i>=0; i--) {
        cout<<a[i];
    }
    cout<<endl;
    return 0;
}


int a[maxx];
int b[maxx];
int c[maxx];
char temp[maxx];
int main()
{
	int n;
	int mm;
	memset(c,0,sizeof(c));
	cin.getline(temp,251);
	a[0] = strlen(temp);
	for(int i = a[0]; i >= 1; --i)
	{
		a[a[0] - i + 1] = temp[i-1] - '0';
	}
	while(a[a[0]] == 0 && a[0] > 1)
	{
		a[0]--;
	}
	cin.getline(temp,251);
	b[0] = strlen(temp);
	for(int i = b[0]; i >= 1; --i)
	{
		b[b[0] - i + 1] = temp[i-1] - '0';
	}
	while(b[b[0]] == 0 && b[0]>1)
	{
		b[0]--;
	}
	int len = max(a[0],b[0]);
	int temp = 0;
	int tempsum;
	for(int i = 1; i <= len; ++i)
	{
		tempsum = a[i] + b[i] + temp;
		c[i] = (tempsum)%10;
		if(tempsum >= 10)
		{
			temp = 1;
		}
		else
		{
			temp = 0;
		}
	}
	if(temp == 1)
	{
		c[len + 1]  += 1;
		len = len + 1;
	}

	for(int i = len; i>=1; --i)
	{
		cout << c[i];
	}

	return 0;
}


int main()
{
	char as[201]="0",bs[201]="0";
	int a[201],b[201],sum[201];
	int lena,lenb,len,jinwei=0;
	int i,j;
	scanf("%s %s",as,bs);
	lena=strlen(as);
	lenb=strlen(bs);
	len=lena>lenb?lena:lenb;
	memset(a,0,sizeof(a));
	memset(b,0,sizeof(b));
	for(i=200;i>200-lena;i--)
		a[i]=as[lena-201+i]-'0';
	for(i=200;i>200-lenb;i--)
		b[i]=bs[lenb-201+i]-'0';
	for(i=200;i>200-len-1;i--)
	{
		sum[i]=(jinwei+a[i]+b[i])%10;
		jinwei=(jinwei+a[i]+b[i])/10;
	}
	for(i=200-len;i<=200;i++)
	{
		if(sum[i]!=0)
		{
			for(j=i;j<=200;j++)
				printf("%d",sum[j]);
			break;
		}
		else if(i==200)
			printf("0\n");

	}
}


int add(char x,char y);
int over(char x,char y);
int main()
{
	char a[260],b[260];
	char c[260];
	int i,j;
	int len,lena,lenb,lenc;
	int o=0;
	int count=0;
	int highesta,highestb;
	scanf("%s",a);
	scanf("%s",b);
	lena=(int)strlen(a);
	lenb=(int)strlen(b);
	len=(lena>lenb)? lena:lenb;
	if (len==lena)
	{
		for (i=lenb;i>=0;i--)
		{
			b[i+lena-lenb]=b[i];
		}
		for (i=0;i<lena-lenb;i++)
		{
			b[i]='0';
		}
	}
	else
	{
		for (i=lena;i>=0;i--)
		{
			a[i+lenb-lena]=a[i];
		}
		for (i=0;i<lenb-lena;i++)
		{
			a[i]='0';
		}
	}
	for (i=len-1;i>=0;i--)
	{
		if (i==len-1)
		{
			c[i]=(char)(add(a[i],b[i])+48);
			o=over(a[i],b[i]);
		}
		if (i>0 && i<len-1)
		{
			if ((add(a[i],b[i])+o)==10)
			{
				c[i]='0';
				o=1;
			}
			else
			{
				c[i]=(char)(add(a[i],b[i])+48+o);
				o=over(a[i],b[i]);
			}
		}
		if (i==0)
		{
			highesta=((int)a[0])-48;
			highestb=((int)b[0])-48;
			if (highesta+highestb+o>=10)
			{
				for (j=len-1;j>=1;j--)
				{
					c[j+1]=c[j];
				}
				c[0]='1';
				c[1]=(char)((highesta+highestb+o-10)+48);
				c[len+1]='\0';
			}
			else
			{
				c[0]=(char)((highesta+highestb+o)+48);
				c[len]='\0';
			}
		}
	}
	lenc=strlen(c);
	for (i=0;i<lenc-1;i++)
	{
		if (c[i]=='0')
		{
			count++;
		}
		else
		{
			break;
		}
	}
	for (i=count;i<lenc-1;i++)
	{
		printf("%c",c[i]);
	}
	printf("%c\n",c[lenc-1]);
	return 0;
}
int add(char x,char y)
{
	int m,n;
	int result;
	m=((int)x)-48;
	n=((int)y)-48;
	result=(m+n>=10)? (m+n-10):(m+n);
	return result;
}
int over(char u,char v)
{
	int p,q;
	int overflow;
	p=((int)u)-48;
	q=((int)v)-48;
	overflow=(p+q>=10)? 1:0;
	return overflow;
}


int c[202],aa[200],bb[200];
int main ()
{
	int add(char *a,char *b);
	char a[200],b[200];
	int cclen,j;
	gets(a);
	gets(b);
	cclen=add(a,b);
	for(j=cclen;j>=0;j--){
      printf("%d",c[j]);
       }
}
int add(char *a,char *b)
{
	int i,k,len;
	int alen=strlen(a);
	int blen=strlen(b);
	len=(alen>blen)? alen:blen;
	k=0;
	for(i=alen-1;i>=0;i--){
        aa[k]=a[i]-'0';
        k++;
        }
    k=0;
    for(i=blen-1;i>=0;i--){
        bb[k]=b[i]-'0';
        k++;
        }
    c[0]=0;
    for(i=0;i<len;i++){
        if(i<alen) c[i]+=aa[i];
        if(i<blen) c[i]+=bb[i];
    }
    for(i=0;i<len;i++){
        c[i+1]+=c[i]/10;
        c[i]=c[i]%10;
        }
    k=len;
    for(i=len;i>0;i--){
       if(c[i]==0)
       k--;
       else
       break;
       }
    return 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;
}


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 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;
}


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);

}


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;
	}

}


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;
}


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");
}


int main()
{
	double a[999];
	double b[999];
	int k;
	cin>>k;
	double max=0;
	int i;
	for(i=0;i<=k-1;i++)
	{
		cin>>a[i];
	    cin>>b[i];
	}
	int j,m;
	double p;
	for(j=0;j<=k-1;j++)
		for(m=0;m<=k-1;m++)
		{
			p=sqrt((a[j]-a[m])*(a[j]-a[m])+(b[j]-b[m])*(b[j]-b[m]));
			if(p>max)
				max=p;
		}
	cout<<max<<endl;
	return 0;
}


struct point
{
	double x;
	double y;
};
double len(struct point m,struct point n)
{
	double l;
	l=sqrt((m.x-n.x)*(m.x-n.x)+(m.y-n.y)*(m.y-n.y));
	return(l);
}
void main()
{
	struct point p[100];
	int n,i,j;
	double max=0;
	scanf("%d",&n);
	scanf("%lf %lf",&p[0].x,&p[0].y);
	for (i=1;i<=n-1;i++)
	{
		scanf("%lf %lf",&p[i].x,&p[i].y);
		for (j=0;j<=i-1;j++)
		{
			if (max<len(p[i],p[j]))
			{
				max=len(p[i],p[j]);
			}
		}
	}
	printf("%.4lf",max);
}


int main ()
{

	int nInput=0, i, j;
	double x[100], y[100], xDiff=0.0;
	double yDiff=0.0, yMax=0.0;
	int yPosition1= 0.0 , yPosition2=0.0, xMax=0.0,xPosition1= 0.0 , xPosition2=0.0;

	cin>>nInput;

	for (i=0; i<nInput; i++)
	{
		cin>>x[i]>>y[i];
	}

	for (i=0; i<nInput; i++)
		for(j=0; j<nInput; j++)
			{xDiff= x[i]-x[j];
				if(xDiff>xMax)
				{
					xMax=xDiff;
					xPosition1 = i;
					xPosition2 = j;

				}
			}

	for (i=0; i<nInput; i++)
		for(j=0; j<nInput; j++)
			{yDiff= y[i]-y[j];
				if(yDiff>yMax)
				{
					yMax=yDiff;
					yPosition1 = i;
					yPosition2 = j;

				}
			}

		cout<<endl;

	if (yMax>=xMax)
		cout<< sqrt((y[yPosition1] - y[yPosition2])*(y[yPosition1] - y[yPosition2])+(x[yPosition1] - x[yPosition2])*(x[yPosition1] - x[yPosition2]) );

	else
		cout<< sqrt((y[xPosition1] - y[xPosition2])*(y[xPosition1] - y[xPosition2]))+(x[xPosition1] - x[xPosition2])*(x[xPosition1] - x[xPosition2]);

	return 0;

}


int main(int argc, char* argv[])
{
	int n;
	scanf("%d",&n);
	double *px,*py;
	px=(double *)malloc(sizeof(double) * n);
    py=(double *)malloc(sizeof(double) * n);
	int i;
	for(i=n-1;i>=0;i--)
	{
		scanf("%lf%lf",&px[i],&py[i]);
	}
    double dis;
    double mdis;
	mdis=0;
    int j;
	for(j=n-1;j>=0;j--)
	{
		for(i=j-1;i>=0;i--)
		{
			dis=(px[j]-px[i])*(px[j]-px[i])+(py[j]-py[i])*(py[j]-py[i]);
			if(mdis<=dis) mdis=dis;
		}
	}
	mdis=sqrt(mdis);
    free(px);
	free(py);
	printf("%.4f\n",mdis);
	return 0;
}