#include <bits/stdc++.h>
using namespace std;

#define int int64_t
#define mod 1000000007

int32_t main() {

	ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif

	int n;
	cin >> n;
	if (n % 4 == 0) {
		int m = n / 2;
		cout << (m + 1)*(m + 1);
	}
	else if (n % 2 == 0) {
		int m = n / 2;
		cout << (m + 1)*(m + 1);
	}
	else {
		int m1 = (n + 1) / 2, m2 = n / 2;
		cout << 2 * (m1 + 1)*(m2 + 1);
	}

	return 0;
}