#include <bits/stdc++.h> using namespace std; int main (){ int u=1,e; cin>>e; for(int i=0;i<=e-2;i++){ u=u+i; } cout<<u; return 0; }