while True: try: a=list(map(int,input().split())) t=1 s=0 while t<=a[0]: if a[t]%2==1: s+=a[t] t+=1 print (s) except EOFError: break