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