/*
#include <stdio.h>
char stack[1000]={};
int top=-1, cnt=0;
void push(char x)
{
top++;
stack[top]=x;
}
char pop()
{
if(top==-1)
{
return -1;
}
else
{
return stack[top--];
}
}
int main()
{
// 정수 문자
int n;
char a[210]={};
scanf("%d\n%s", &n, a);
for(int i=n-1; i>=0; i--)
{
push(a[i]);
cnt++;
if(cnt%3==0&&cnt<n)
{
push(',');
}
}
while(top!=-1)
{
printf("%c", pop());
}
return 0;
}
*/
#include <stdio.h>
int stack[100000000]={};
int top=-1;
void push(int x)
{
top++;
stack[top]=x;
}
int pop()
{
if(top==-1)
{
return -1;
}
else
{
return stack[top--];
}
}
int main()
{
char a[150]={}, b[150]={}, c=0;
int topa, topb, numa, numb, num;
scanf("%s\n%s", a, b);
topa=strlen(a)-1;
topb=strlen(b)-1;
while(1)
{
numa=numb=0;
if(topa!=-1)
{
numa = a[topa--]-'0';
}
if(topb!=-1)
{
numb = b[topb--]-'0';
}
num = numa+numb+c;
push(num%10);
c=num/10;
if(topa==-1&&topb==-1)
{
break;
}
}
while(top!=-1)
{
printf("%d", pop());
}
return 0;
}