#include #include using namespace std; #define ll long long string A, B, C = ""; int main() { cin >> A >> B; reverse(A.begin(), A.end()); reverse(B.begin(), B.end()); int rem = 0, idx = 0; while (1) { int s = rem; if (idx < A.size()) s += (A[idx]-'0'); if (idx < B.size()) s += (B[idx]-'0'); rem = 0; if (s >= 10) rem = 1; C += char('0'+(s%10)); idx++; if (idx >= A.size() && idx >= B.size()) break; } if (rem == 1) C += '1'; reverse(C.begin(), C.end()); cout << C << endl; }