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