#include<iostream>
#include<vector>
#include<queue>
#include<cstring>
#include<cmath>
#include<map>
#include<set>
#include<cstdio>
#include<algorithm>
#define debug(a) cout<<#a<<"="<<a<<endl;
using namespace std;
const int maxn=1e3+100;
typedef long long LL;
LL a[maxn];
int main(void)
{
  cin.tie(0);std::ios::sync_with_stdio(false);
  LL n;cin>>n;
  if(n==1){
    cout<<4<<endl;
  }
  else{

    if(n&1) cout<<(1+ ( (3*n*(n+4)+2)+ ( (n+4)*n+2 )   )/8 )<<endl;
    else cout<<(1+ ( (3*n*(n+4)+2)- ( (n+4)*n+2 )   )/8 )<<endl;
  }
return 0;
}
