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