/*#include <stdio.h>
#include <stdlib.h>
int main()
{
printf("Hello world!\n");
return 0;
}
*/
/*#include<stdio.h>
#include<string.h>
int stack[105]= {};
int main()
{
int i,j,p=0;
char stra[102]= {},strb[102]= {};
scanf("%s %s",stra,strb);
int a=strlen(stra),b=strlen(strb);
if(a>=b)
{
for(j=0; j<a-b; j++)
{
strb[j+b]=0;
}
}
else
{
for(j=0; j<b-a; j++)
{
stra[j+a]=0;
}
}
for(i=0; i<a; i++)
{
if((stra[0]-'0'+strb[0]-'0')==10)
{
stack[0]=0;
}
else
{
stack[0]=(stra[0]-'0'+strb[0]-'0')%10;
}
p=(stra[i]-'0'+strb[i]-'0')%10;
//printf("%d\n",p); //<---
if((stra[i+1]-'0'+strb[i+1]-'0'+p)==10)
{
stack[i]=p;
}
stack[i+1]=(stra[i+1]-'0'+strb[i+1]-'0'+p)%10;
//printf("%d\n",stack[i+1]);//<---
p=0;
printf("%d",stack[i]);
}
return 0;
}*/
/*#include<stdio.h>
#include <string.h>
int main() {
char data1[100]= {0};
char data2[100] = {0};
char temp[100] = {0};
int stack[1000] = {0};
int top = 0;
scanf("%s %s", data1, data2);
if(strlen(data1) > strlen(data2)) {
strcpy(temp, data1);
strcpy(data1, data2);
strcpy(data2, temp);
}
for(int i=0; i<strlen(data2); i++) {
stack[top++] = data2[i]-'0';
}
for(int i=strlen(data1)-1; i>=0; i--) {
char x = data1[i];
int xx = x - '0';
int pp=stack[i];
printf("%d",pp);
}
}*/
#include<stdio.h>
#include<string.h>
int main()
{
char str1[150]={},str2[105]={};
int stack[150]={},k=0,top=0,x,y,i;
int px,py;
scanf("%s %s",str1,str2);
x=strlen(str1)-1;
y=strlen(str2)-1;
for(;;)
{
if(x<0||y<0)
{
break;
}
px=str1[x]-'0';
x--;
py=str2[y]-'0';
y--;
k=px+py+k;
stack[top++]=k%10;
k=(px+py)/10;
}
printf("%d %d\n", x, y);
printf("%c %c\n", str1[x], str2[y]);
if(x!=0)
{
printf("x\n");
for(;x>=0;)
{
px=str1[x]-'0';
x--;
k=px+k;
stack[top++]=k%10;
k=(px+k)/10;
}
}
else if(y!=0)
{
printf("y\n");
for(;y>=0;)
{
py=str2[y]-'0';
y--;
k=py+k;
stack[top++]=k%10;
k=(py+k)/10;
}
}
else
{
stack[top++]=k;
k = 0;
}
// if()
// {
//
// }
for(i=top-1;i>=0;i--)
{
printf("%d",stack[i]);
}
return 0;
}