#include<bits/stdc++.h> using namespace std; int main() { long long int n,m,a,b,c; while(cin>>n) { m=(n+1)/2; m=(1+m*2-1)*m-1; cout<<m*3-6<<'\n'; } }