#include<bits/stdc++.h>
using namespace std;
#define ll long long int
#define ld long double
#define fast ios_base::sync_with_stdio(false),cin.tie(0),cout.tie(0)
#define COUT cout<<fixed<<setprecision(12)
#define CIN getline(cin,s)
ll MOD=1e9+7;


void solve()
{
	ll n;
	cin>>n;
	if(n%2==0)
	{
		ll m=n/2;
		m++;
		cout<<m*m;
	}
	else
	{
		ll m=n/2;
		cout<<2*(m+1)*(m+2);
	}
}

int main()
{
	ll t=1;
	fast;

	//cin>>t;
	for(ll i=1;i<=t;i++)
	{
		solve();
	}
	return 0;
}