#include<iostream>using namespace std;int array(int n){ if(n==1) return 1; else if(n>1) return array(n-1)+(n-1);}int main(){ int n; while(cin>>n) cout<<array(n)<<endl; return 0;}