#include<bits/stdc++.h>
typedef long long LL;
using namespace std;
void debug_out() { cerr << '\n'; }
template<typename T, typename ...R>void debug_out(const T &f, const R &...r) {cerr << f << " ";debug_out(r...);}
#define debug(...) cerr << "[" << #__VA_ARGS__ << "]: ", debug_out(__VA_ARGS__);

int n,ans;

int main(){
    ios::sync_with_stdio(false);
    cin >> n;
    if(n % 2 == 0){
        cout << (n / 2 + 1) * (n / 2 + 1) << "\n";
        return 0;
    }
    int mor = (n + 1) / 2;
    ans = (mor + 1) * (n - mor + 1) * 2;
    cout << ans << "\n";
    return 0;
}