#include<iostream>
#include<string>
#include<algorithm>
#include<stack>
#include<math.h>
#include<map>
#include<unordered_map> 
#include<vector>
#include<queue>
#include<set>
#include<cstdio>
#include<deque> 
#include<bitset>
#include <cmath>
#include<string>
#define N 40
#define K 300005
#define MOD 1e9+7
#define int long long 
#define fastio  ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
#define pi 3.14159265358979323846

using namespace std;

 
int max(int a, int b){
    if(a > b)
        return a;
    return b;
}
int min(int a, int b){
    if(a < b)
        return a;
    return b;
}
 
int gcd (int a, int b) {
    if (b == 0)
        return a;
    else
        return gcd (b, a % b);
}
 
int32_t main(){
    fastio
    int n;
    cin>>n;
    if(n%2 == 0){
        int val = n/2 + 1;
        cout<<val * val<<endl;
    }
    else{
        int val = n/2;
        int val2= n/2 + 1;
        cout<<(val + 1) * (val2 +  1) * 2<<endl;
    }
    
}