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