#include<iostream> using namespace std; int main(){ int sum=0,a; while(1){ cin>>a; sum+=a; a--; if(a<0){ break; } } cout<<sum; return 0; }