#include using namespace std; #ifdef LOCAL #include "algo/debug.hpp" #else #define debug(...) ((void)0) #endif int main() { constexpr char endl = '\n'; std::ios::sync_with_stdio(false); std::cin.tie(nullptr); string a, b; cin >> a >> b; vector A, B; for (int i = (int)a.size(); i--;) A.push_back(a[i] - '0'); for (int i = (int)b.size(); i--;) B.push_back(b[i] - '0'); int N = max(A.size(), B.size()); while ((int)A.size() < N) A.push_back(0); while ((int)B.size() < N) B.push_back(0); int r = 0; vector ans; int i = 0; while (i < N || r > 0) { int t = (i < N ? A[i] : 0), s = (i < N ? B[i] : 0); if (t + s + r >= 10) { ans.push_back((t + s + r) % 10); r = (t + s + r) / 10; } else { ans.push_back(t + s + r); r = 0; } i += 1; } string ret = ""; while ((int)ans.size() > 0) { ret += to_string(ans.back()); ans.pop_back(); } cout << ret << endl; return 0; }