1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
#include <iostream>
#include <algorithm>
using namespace std;

int main()
{
    ios_base::sync_with_stdio(0);
    int n, m = 1001, s = 0, t;
    cin >> n;
    for (int i = 0; i < n; i++) {
        cin >> t;
        m = t % 2 ? min(m, t) : m;
        s += t;
    }
    if (s == m) {
        cout << "NIESTETY" << endl;
    }
    else {
        cout << (s % 2 ? s - m : s) << endl;
    }
    return 0;
}