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