#include<stdio.h> #include<string.h> int main() { char arr1[10000]; char arr2[10000]; while (scanf("%s %s", arr1, arr2) != EOF) { int num1[10000] = {0}; int num2[10000] = {0}; int len1 = strlen(arr1); int len2 = strlen(arr2); for (int i = 0; i < len1; i++) num1[i] = arr1[len1 - 1 - i] - '0'; for (int j = 0; j < len2; j++) num2[j] = arr2[len2 - 1 - j] - '0'; int len = len1 > len2 ? len1 : len2; int num[10000] = {0}; int flag = 0; for (int k = 0; k <= len ; k++) { int sum = num1[k] + num2[k] + flag; if (sum < 10) { num[k] = sum; flag = 0; } else { num[k] = sum % 10; flag = 1; } } if (num[len]) printf("%d", num[len]); for (int x = 0; x < len; x++) printf("%d", num[len - 1 - x]); printf("\n"); } return 0; }