#define _CRT_SECURE_NO_WARNINGS #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; typedef string::const_iterator State; #define Ma_PI 3.141592653589793 #define eps 0.00000001 #define LONG_INF 1e18 #define GOLD 1.61803398874989484820458 #define MAX_MOD 1000000007 #define MOD 998244353 #define seg_size 262144 #define REP(a,b) for(long long a = 0;a < b;++a) vector> DFT(vector> a) { int n = a.size(); if (n == 1) return a; vector> a0(n / 2), a1(n / 2); REP(i, n) { if (i % 2 == 0) { a0[i / 2] = a[i]; } else { a1[i / 2] = a[i]; } } vector> inversed_a0 = DFT(a0), inversed_a1 = DFT(a1); vector> inversed_a(n); for (int i = 0; i < n; ++i) { complex zeta = complex(cos(2 * Ma_PI * i / n), sin(2 * Ma_PI * i / n)); inversed_a[i] = inversed_a0[i % (n / 2)] + zeta * inversed_a1[i % (n / 2)]; } return inversed_a; } vector> IDFT(vector> inversed_a) { int n = inversed_a.size(); vector> now = DFT(inversed_a); reverse(now.begin(), now.end()); for (int q = now.size() - 1; q >= 1; --q) { swap(now[q], now[q - 1]); } REP(i, n) { now[i] /= complex(n, 0); } return now; } vector> conv(vector> a, vector> b) { int deg = a.size() + b.size() - 1; int n = 1; while (n < deg) n <<= 1; a.resize(n); b.resize(n); vector> inversed_a = DFT(a), inversed_b = DFT(b); vector> inversed_c(n); REP(i, n) { inversed_c[i] = inversed_a[i] * inversed_b[i]; } return IDFT(inversed_c); } long long inv(long long now) { long long hoge = MOD - 2LL; long long ans = 1; while (hoge != 0) { if (hoge % 2 == 1) { ans *= now; ans %= MOD; } hoge /= 2; now *= now; now %= MOD; } return ans; } int main() { int n; scanf("%d", &n); char hoge = getchar(); string s; getline(cin, s); for (int q = 0; q < s.length(); ++q) { if (s[q] == ' ') { cout << "\"assert\"" << endl; return 0; } } vector a; a.push_back(stoll(s)); REP(q, 2) { long long hoge; cin >> hoge; a.push_back(hoge); } set tmp; tmp.insert(a[0] + a[1]); tmp.insert(a[0] + a[2]); tmp.insert(a[1] + a[2]); vector teas; for (auto i = tmp.begin(); i != tmp.end(); ++i) { teas.push_back(*i); } sort(teas.begin(), teas.end(), greater()); cout << teas[1] << endl; }