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