#include <stdio.h>
#include <ctype.h>
int main(void) {
char str1[10000] = {0};
char str2[10000] = {0};
while(scanf("%s", str1) != EOF) {
scanf("%s\n", str2);
int length1 = strlen(str1);
int length2 = strlen(str2);
unsigned int str_out[10001] = {0};
int max_length = 0;
if ( length1 > length2) {
max_length = length1;
} else {
max_length = length2;
}
int flag = 0;
int x = length1 - 1;
int y = length2 - 1;
for(int i = max_length; i >= 0; i--) {
if(i == 0) {
str_out[0] = flag;
break;
}
str_out[i] = str1[x] + str2[y] - '0' - '0' + flag;
if(str_out[i] > 9) {
str_out[i] = str_out[i] -10;
flag = 1;
} else {
flag = 0;
}
if(x == 0 ) str1[0] = '0';
else x--;
if(y == 0 ) str2[0] = '0';
else y--;
}
for(int j = 0; j <= max_length; j++) {
if((str_out[j] == 0) && (j == 0)) continue;
printf("%d", str_out[j]);
}
printf("\n");
memset(str1, 0, 10000);
memset(str2, 0, 10000);
}
return 0;
}
#include <ctype.h>
int main(void) {
char str1[10000] = {0};
char str2[10000] = {0};
while(scanf("%s", str1) != EOF) {
scanf("%s\n", str2);
int length1 = strlen(str1);
int length2 = strlen(str2);
unsigned int str_out[10001] = {0};
int max_length = 0;
if ( length1 > length2) {
max_length = length1;
} else {
max_length = length2;
}
int flag = 0;
int x = length1 - 1;
int y = length2 - 1;
for(int i = max_length; i >= 0; i--) {
if(i == 0) {
str_out[0] = flag;
break;
}
str_out[i] = str1[x] + str2[y] - '0' - '0' + flag;
if(str_out[i] > 9) {
str_out[i] = str_out[i] -10;
flag = 1;
} else {
flag = 0;
}
if(x == 0 ) str1[0] = '0';
else x--;
if(y == 0 ) str2[0] = '0';
else y--;
}
for(int j = 0; j <= max_length; j++) {
if((str_out[j] == 0) && (j == 0)) continue;
printf("%d", str_out[j]);
}
printf("\n");
memset(str1, 0, 10000);
memset(str2, 0, 10000);
}
return 0;
}