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