#include<iostream> #include<cstdio> using namespace std; int main(){ int a,n; cin>>a; int ans=0; while(cin>>n,n<=0); for(int i=0;i<n;i++,a++) ans+=a; cout<<ans<<endl; return 0; }