#include <bits/stdc++.h>
using namespace std;

#define lli long long
#define pb push_back
#define mp make_pair
#define st first
#define nd second
#define endl "\n"
#define max(aa, bb) (aa > bb ? aa:bb)
#define min(aa, bb) (aa < bb ? aa:bb)
#define all(aa) aa.begin(), aa.end()
const lli INF = LLONG_MAX;

int main(){
	lli n;
	cin>>n;
	if(n%2) cout<<(n+1)/2*((n+1)/2+1)/2*4<<endl;
	else cout<<(n/2+1)*(n/2+1);
}