using namespace std; int n,cur=0;; void dg(int x){ if(x!=0){ cur+=x; x--; dg(x); } else return; } main(){ ios::sync_with_stdio(0); scanf("%d",&n); dg(n); cout<<cur-1; }