while True: sl = map(int, raw_input().strip().split()) n, a = sl[0], sl[1:] sum = 0 for i in range(n): if a [i] % 2==1: sum += a [i] print sum