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