a=open(0) s=0 while a:*a,x=a;s+=int(x);print(s)