#include #include #include #include #include #define llint long long using namespace std; int n; vector vec; vector vec2; llint get(string s) { llint ret = 0, mul = 1; reverse(s.begin(), s.end()); for(int i = 0; i < s.size(); i++) ret += mul*(s[i]-'0'), mul *= 10; return ret; } int main(void) { string s; while(getline(cin, s)){ vec.push_back(s); } if(vec.size() == 2){ cout << "\"assert\"" << endl; return 0; } vec2.push_back(get(vec[1]) + get(vec[2])); vec2.push_back(get(vec[1]) + get(vec[2])); vec2.push_back(get(vec[2]) + get(vec[3])); sort(vec2.begin(), vec2.end()); vec2.erase(unique(vec2.begin(), vec2.end()), vec2.end()); reverse(vec2.begin(), vec2.end()); cout << vec2[1] << endl; return 0; }