#include #include #include #include #include #define _USE_MATH_DEFINES #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; #define FOR(i,m,n) for(int i=(m);i<(n);++i) #define REP(i,n) FOR(i,0,n) #define ALL(v) (v).begin(),(v).end() const int INF = 0x3f3f3f3f; const long long LINF = 0x3f3f3f3f3f3f3f3fLL; const double EPS = 1e-8; const int MOD = 1000000007; // 998244353; const int dy[] = {1, 0, -1, 0}, dx[] = {0, -1, 0, 1}; /*-------------------------------------------------*/ int main() { cin.tie(0); ios::sync_with_stdio(false); // freopen("input.txt", "r", stdin); string s; getline(cin, s); int n = stoi(s); getline(cin, s); int pos = s.find(' '); if (pos == s.npos) { vector a(3); a[0] = stoll(s); FOR(i, 1, 3) cin >> a[i]; vector tmp; REP(i, 3) FOR(j, i + 1, 3) tmp.emplace_back(a[i] + a[j]); sort(ALL(tmp)); tmp.erase(unique(ALL(tmp)), tmp.end()); reverse(ALL(tmp)); cout << tmp[1] << '\n'; } else { cout << "\"assert\"\n"; } return 0; }