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