#include<bits/stdc++.h> using namespace std; int main(){ int a,b=1,i,c=0; cin>>a; for(i=3;i<=a;i++){ c+=1; b+=c; } cout<<b; }