1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#include <bits/stdc++.h>

using namespace std;

const int INF = 1e9 + 33;

int main()
{
    int n, ile = 0;
    long long a, sum = 0, mini = INF;
    
    scanf("%d", &n);
    
    for(int i = 0; i < n; i++)
      {
          scanf("%lld", &a);
          
          sum += a;
          
          if(a % 2ll == 1ll)
            {
                ile++;
                mini = min(mini, a);
            }
      }
    
    if(ile % 2 == 1)
      sum -= mini;
    
    if(sum == 0ll)
      puts("NIESTETY");
    
    else
      printf("%lld\n", sum);
    
    //system("pause");
    return 0;
}