import java.util.Scanner;
// 注意类名必须为 Main, 不要有任何 package xxx 信息
public class Main {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
// 注意 hasNext 和 hasNextLine 的区别
while (in.hasNextLine()) { // 注意 while 处理多个 case
String a = in.nextLine();
String b = in.nextLine();
porcess(a, b);
}
}
private static void porcess(String a, String b) {
int al = a.length()-1;
int bl = b.length()-1;
int bit = 0;//进位
StringBuffer buffer = new StringBuffer();
//从字符串末尾递减 各索引位置的值相加
while(al >= 0 || bl >= 0) {
int res;
if(al >= 0 ^ bl >= 0) {
if(al >= 0) {
int x = a.charAt(al) - '0';
res = x + bit;
al--;
}else {
int y = b.charAt(bl) - '0';
res = y + bit;
bl--;
}
} else {
// a(al) + b(bl) + 进位
int x = a.charAt(al) - '0';
int y = b.charAt(bl) - '0';
res = x + y + bit;
al--; bl--;
}
bit = 0;
if(res/10 != 0) {//大于10场景, 进位为1
bit = res/10;
buffer.append(res%10);
} else {//小于10场景
buffer.append(res);
}
}
if(bit != 0) {
buffer.append(bit);
}
System.out.println(buffer.reverse().toString());
}
}