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