//  sasi2.cpp
//
//
//  Created by DAMPURI on 29/07/20//.
#include<bits/stdc++.h>
 
using namespace std;
#define ll long long
#define pb push_back
#define pp pop_back
#define endl '\n'
#define INF 4000000000000000000
ll mod=1000000007;
 
typedef pair<int, int> pi;
typedef pair<ll,ll> pl;
 
#define FOR(i, a, b) for (ll i=a; i<(b); i++)
#define F0R(i, a) for (ll i=0; i<(a); i++)
#define FORd(i,a,b) for (ll i = (b)-1; i >= a; i--)
#define F0Rd(i,a) for (ll i = (a)-1; i >= 0; i--)
 
const int N = 300500;


 
int main()
{
    ios_base::sync_with_stdio(0);
    cin.tie(NULL);
    
   
        ll n;
        cin>>n;
        
        ll res=0;
        if(n%4==1 || n%4==3){
        FOR(i,1,n/2+2)
            res+=i;
            res*=4;
        }
        else if(n%4==0)
            res= (4*(n/4+1)*(n/4))+1;
        else
            res=4*(n/4+1)*(n/4+1);
        
        cout<<res<<endl;
            
        
  
        
}
