#include<stdio.h> main() { int t,sum=0; while(scanf("%d",&t)!=0) { if(t==-1) break; sum=sum+t; } printf("%d\n",sum); }