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