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