#include #include using namespace std; int main(){ string s,t;cin>>s>>t; if(s.size() < t.size())swap(s,t); reverse(s.begin(), s.end()); reverse(t.begin(), t.end()); int k = 0; for(int i = 0; t.size() > i; i++){ char tmp = ((s[i]-'0'+t[i]-'0'+k)%10) + '0'; k = (s[i]-'0'+t[i]-'0'+k) >= 10; s[i] = tmp; } for(int i = t.size(); s.size() > i; i++){ char tmp = ((s[i]-'0'+k)%10) + '0'; k = (s[i]-'0'+k) >= 10; s[i] = tmp; } if(k)s.push_back('1'); reverse(s.begin(), s.end()); cout << s << endl; }