#include <iostream>using namespace std;
int main(){ int a, b; while(cin >> hex >> a >> b){ cout << dec << a + b << endl; } return 0;}