#include <iostream> using namespace std; int main(){ int n,j,a=1; cin>>n; for(j=0;j<n-1;j++){ a+=j; } cout<<a<<endl; }