#include<bits/stdc++.h>
using namespace std;
const int MAXN = 1010;
int vis[MAXN*2][MAXN*2],T,n,m,ans;
/*
void dfs(int x,int y,int step,int now){
	if(step==n){
		
		if(!vis[x+MAXN][y+MAXN]) ans++,vis[x+MAXN][y+MAXN] = 1;
		return;
	}
	if(now==1){
		dfs(x+1,y,step+1,2);
		dfs(x-1,y,step+1,2);
	}
	else if(now==2){
		dfs(x,y+1,step+1,1);
		dfs(x,y-1,step+1,1);
	}
	else{
		dfs(x+1,y,step+1,2);
		dfs(x-1,y,step+1,2);
		dfs(x,y+1,step+1,1);
		dfs(x,y-1,step+1,1);
	}
}
*/
int main(){
	int aa = -1;
		cin>>n;
		long long a1 = 3*n*(n+4)+2,a2 = n%2==0?aa*(n*(n + 4)+2):-aa*(n*(n + 4)+2);
		cout<<1 + (a1+a2)/8<<endl;
}