#41643: a dp solution


s210130 (William)


#include <bits/stdc++.h>
bool e[1000];
long long ans[1001];
long long lo(long long x){
  if(!e[x]){
    ans[x]=lo(x-1)+x-1;
    e[x]=1;
  }
  return ans[x];
}
using namespace std;
int main() {
  ans[1]=1;
  e[1]=1;
  int e;
  int x=0,y=0,z=0;
  while(cin>>e){
    cout<<lo(e)<<endl;
  }
  return 0;
}