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