#include using namespace std; #define REP(i,n) for(int i=0; i<(int)(n); i++) int main() { ios_base::sync_with_stdio(0); cin.tie(0); int n; cin >> n; vector v(3); string s; getline(cin, s); // newline getline(cin, s); if (count(s.begin(), s.end(), ' ') > 1) cout << "assert" << endl; else { v[0] = stoll(s); cin >> v[1] >> v[2]; vector sum; REP (i, 3) REP (j, i) sum.push_back(v[i] + v[j]); sort(sum.rbegin(), sum.rend()); sum.erase(unique(sum.begin(), sum.end()), sum.end()); cout << sum[1] << endl; } return 0; }