#include<bits/stdc++.h>

using namespace std;
#define FAST ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL);

const int M = 1000000007;
const long long INF = 2e18;

void solve() {
    int n;
    cin >> n;
    vector<int> dp(n + 1, 0);
    dp[0] = 1;
    dp[1] = 4;
    dp[2] = 4;
    for (int i = 3; i <= n; i++) {
        if (i & 1LL) dp[i] = 4 + 4*(i/2) + dp[i - 2];
        else dp[i] = (i / 2 + 1) * (i / 2 + 1);
    }
    cout << dp[n] << endl;
}

signed main() {
    FAST
    int tc = 1;
//    cin >> tc;
    while (tc--) {
        solve();
    }
}