#include #include using namespace std; using namespace atcoder; using ll = long long; using pl = std::pair; using mint = atcoder::modint1000000007; //using mint = atcoder::modint998244353; #define rep(i, srt, end) for (long long i = (srt); i < (long long)(end); i++) #define all(v) (v).begin(), (v).end() #define dump(var) do{ if(debug::enable) { std::cerr << #var << " : "; debug::print(var); } } while(0); constexpr int di[4] = {1, -1, 0, 0}; constexpr int dj[4] = {0, 0, 1, -1}; constexpr long long inf = 1LL<<60; template inline void chmax(T &a, T b) { a = std::max(a, b); }; template inline void chmin(T &a, T b) { a = std::min(a, b); }; template void vprint(const std::vector& v) { for(int i = 0; i < v.size(); i++) { std::cout << v[i] << (i == v.size()-1 ? "\n" : " "); } } template void vprintln(const std::vector& v) { for(int i = 0; i < v.size(); i++) { std::cout << v[i] << "\n"; } } template void vprint(const std::vector>& v) { for(int i = 0; i < v.size(); i++) { std::cout << v[i].val() << (i == v.size()-1 ? "\n" : " "); } } template void vprintln(const std::vector>& v) { for(int i = 0; i < v.size(); i++) { std::cout << v[i].val() << "\n"; } } namespace debug { #if defined(ONLINE_JUDGE) const bool enable = false; #else const bool enable = true; #endif template void push(const T& e) { std::cerr << e; } template void push(const atcoder::static_modint& e) { std::cerr << e.val(); } template void push(const std::pair& e) { std::cerr << "("; push(e.first); std::cerr << ","; push(e.second); std::cerr << ")"; } template void push(const std::tuple& e) { std::cerr << "("; push(get<0>(e)); std::cerr << ","; push(get<1>(e)); std::cerr << ","; push(get<2>(e)); std::cerr << ")"; } template void print(const T& e) { push(e); std::cerr << "\n"; } template void print(const std::vector& v) { for(int i = 0; i < v.size(); i++) { push(v[i]); std::cerr << " "; } std::cerr << "\n"; } template void print(const std::vector>& v) { std::cerr << "\n"; for(int i = 0; i < v.size(); i++) { std::cerr << i << ": "; print(v[i]); } } }; string add(string a, string b) { reverse(a.begin(), a.end()); reverse(b.begin(), b.end()); ll n = max(a.size(), b.size()); while(a.size() < n) a.push_back('0'); while(b.size() < n) b.push_back('0'); string res; ll age = 0; rep(i, 0, n) { ll cur = age + (a[i] - '0') + (b[i] - '0'); res.push_back(cur % 10 + '0'); age = cur / 10; } if(age) res.push_back('1'); reverse(res.begin(), res.end()); return res; } string sub(string a, string b) { ll n = max(a.size(), b.size()); assert(a.size() > b.size() || a >= b); reverse(a.begin(), a.end()); reverse(b.begin(), b.end()); while(a.size() < n) a.push_back('0'); while(b.size() < n) b.push_back('0'); string res; ll age = 0; rep(i, 0, n) { if(a[i] < '0' || a[i] < b[i]) { assert(i != n-1); a[i] += 10; a[i+1] -= 1; } ll cur = (a[i] - b[i]) + '0'; res.push_back(cur); } while(!res.empty()) { if(res.back() == '0') res.pop_back(); else break; } if(res.empty()) res.push_back('0'); reverse(res.begin(), res.end()); return res; } void solve() { string a, b; cin >> a >> b; auto ans = add(a, b); cout << ans << endl; } int main() { ios::sync_with_stdio(false); cin.tie(nullptr); solve(); return 0; }