#include<iostream>
using namespace std;
int main()
{
	int n;
	cin>>n;
	if (n==1||n==2)cout<<4<<"\n";
		else if ((n&1)==1){
			int h1=n/2+2;
			cout<<h1*(n+1)<<"\n";
		} else {
			int sqr=n/2+1;
			cout<<sqr*sqr<<"\n";
		}
	return 0;
}
