#!/usr/bin/python while True: list=map(int,raw_input().split()) s=0 if list[0]!=0: for i in range(1,list[0]+1): if list[i]%2: s=s+list[i] print s else: break