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
#include <cstdio>
#include <cstdlib>
#include <algorithm>

int main()
{
	int n;
	scanf("%d", &n);
	int minOdd = 1001;
	int countOdd = 0;
	int sum = 0;
	for(int i = 0, t; i < n; ++i)
	{
		scanf("%d", &t);
		sum += t;
		if(t&1)
		{
			++countOdd;
			if(t < minOdd) minOdd = t;
		}
	}
	if(!(countOdd&1) || (sum -= minOdd) > 0)
		printf("%d", sum);
	else
		puts("NIESTETY");
	return 0;
}