Problem: A robot is standing at the origin of the infinite two-dimensional plane. Each second the robot moves exactly 1 meter in one of the four cardinal directions: north, south, west, and east. For the first step the robot can choose any of the four directions, but then at the end of every second it has to turn 90 degrees left or right with respect to the direction it just moved in. For example, if the robot has just moved north or south, the next step it takes has to be either west or east, and vice versa.

The robot makes exactly n steps from its starting position according to the rules above. How many different points can the robot arrive to at the end? The final orientation of the robot can be ignored.

Input

The only line contains a single integer n (1 ≤ n ≤ 1000) — the number of steps the robot makes.

Output

Print a single integer — the number of different possible locations after exactly n steps.

Examples

Input


1


Output


4


Input


2


Output


4


Input


3


Output


12

Note

In the first sample case, the robot will end up 1 meter north, south, west, or east depending on its initial direction.

In the second sample case, the robot will always end up √{2} meters north-west, north-east, south-west, or south-east.

Solution (in CPP):

Solution:
#include <string.h>
#include <assert.h>
#include <cassert>
#include <unordered_map>
#include <unordered_set>
#include <time.h>

#include <sstream>
#include <stdio.h>
#include <assert.h>
#include <math.h>
#include <bitset>
#include <algorithm>
#include <iostream>
#include <stack>
#include <queue>
#include <set>
 
#include <map>
#include <vector>
#include <string>
#include <stdlib.h>
#include <cassert>
//#include<bits/stdc++.h>

 
#define ll long long
#define ull unsigned long long
#define clr(x) memset(x,0,sizeof(x))
#define _clr(x) memset(x,-1,sizeof(x))
#define fr(i,a,b) for(int i = a; i < b; ++i)
#define frr(i,a,b) for(int i = a; i > b; --i)
#define pb push_back
#define sf scanf
 
#define pf printf
#define mp make_pair
#define pir pair<int,int>
#define N 211100
 
using namespace std;

int a[N];
int b[N];
int n;

int d[4][2] = {1,0, 0,-1, -1,0, 0,1};

int gcd(int a, int b){
	return b?gcd(b,a%b):a;
}

struct step{
	int x,y,d;
	int n;
	bool operator<(const step&a) const{
		return a.x < x || (a.x==x&&a.y<y) || (a.x==x&&a.y==y&&a.d<d) || (a.x==x&&a.y==y&&a.d==d&&a.n<n);
	}
};

int check(int t){
	int x = 0, y = 0;
	queue<step> q;
	set<pair<int,int> > ft;
	for(int i = 0; i < 4; ++i){
		int xx = x+d[i][0];
		int yy = y+d[i][1];
		q.push(step{xx,yy,i,1});
	}

	set<step> v;
	while(!q.empty()){
		int x = q.front().x;
		int y = q.front().y;
		int dir = q.front().d;
		int n = q.front().n;
		step s = q.front();
		q.pop();
		if(n==t){
			ft.insert(mp(x,y));
			continue;
		}
		if(v.find(s) != v.end()){
			continue;
		}
		v.insert(s);
		//printf("x = %d y = %d dir = %d\n",x,y,dir);	
		for(int i = -1; i <=1; i+=2){
			int xx = x + d[(dir+i+4)%4][0];
			int yy = y+d[(dir+i+4)%4][1];
			//printf("next x = %d y = %d dir = %d\n",xx,yy,dir);	
			q.push( step{xx,yy,(dir+i+4)%4, n+1});
		}
	}
	return ft.size();
}

ll sol(ll n){
	ll ans = 0;
	if(n%2==0){
		ans = 1ll*(n/2+1)*(n/2+1);
	}
	else {
		ll x = (n+1)/2;
		x = (1+x)*x/2;
		ans = 4*x;
	}
	return ans;
}

int main(){
	ll n;
	cin>>n;
	cout<<sol(n)<<endl;
	//for(int i = 1; i <40; i++){
	//	printf("i = %d t = %d ans = %lld\n",i,check(i),sol(i));
	//}
}