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