#include <iostream>
#include <queue>
#include <stack>
#include <vector>
#include <stdio.h>
#include <algorithm>
#include <string.h>
#include <string>
#include <cmath>
#include <complex>
#include <map>
using namespace std;

#define rep(i,n) for(int i=0;i<int(n);++i)
#define ALL(v) (v).begin(),(v).end()
#define PB push_back
#define EPS 1e-8

static const double PI=6*asin(0.5);
typedef complex<double> P;
typedef long long ll;


//1=2
//2=4
//3=6+1=7
//4=8+3=11
//5=10+6=16
//6=12+10=22

int n;
vector<int> a;
int main(){
	a.PB(0);
	a.PB(0);
	a.PB(0);
	a.PB(1);
	a.PB(3);
	while(cin>>n){
		ll res=2*n;
		if(n>a.size()-2){
			while(n==a.size()){
				a.PB(a[a.size()-1]+a.size()-2);
			}
		}
		res+=a[n];
		cout<<res<<endl;
	}
	return 0;
}