#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ull unsigned long long
#define pb push_back
#define all(x) x.begin(), x.end()
#define sortall(x) sort(all(x))
#define reverseall(x) reverse(all(x))
#define to_upper(x) transform(x.begin(), x.end(), x.begin(), ::toupper)
#define to_lower(x) transform(x.begin(), x.end(), x.begin(), ::tolower)
#define FOR(i,n) for(int i=0;i<n;i++)
#define FORS(i,s,n) for(int i=s;i<n;i++)
#define send {ios_base::sync_with_stdio(false);}
#define help {cin.tie(NULL); cout.tie(NULL);}
#define deb(x) cout << #x << "=" << x << endl
#define deb2(x, y) cout << #x << "= " << x << ", " << #y << "= " << y << endl
#define clr(x) memset(x, 0, sizeof(x))
#define PI 3.1415926535897932384626
typedef pair<int, int>	pii;
typedef pair<ll, ll>	pl;
typedef vector<int>		vi;
typedef vector<ll>		vl;
typedef vector<pii>		vpii;
typedef vector<pl>		vpl;
typedef vector<vi>		vvi;
typedef vector<vl>		vvl;
typedef priority_queue<int, vi, greater<int>> minpq;
typedef priority_queue<ll, vi, greater<ll>> minpql;
const int mod = 1000000007;
void YES(bool t = 1) { const string YESNO[2] = {"NO", "YES"};cout << YESNO[t] << endl; }
void Yes(bool t = 1) { const string YesNo[2] = {"No", "Yes"};cout << YesNo[t] << endl; }
void yes(bool t = 1) { const string yesno[2] = {"no", "yes"};cout << yesno[t] << endl; }
inline bool isPowerOfTwo(int x) { return x && (!(x&(x-1))); } 
ll mpow(int b, int e, int modu=0) {
    ll result = 1,base = b, exp = e;
    if(modu) base %= mod;
    while (exp > 0) {
        if (exp & 1){
            result = ((ll)result * base) ;
            if(modu) result %= mod;
        }
        base = ((ll)base * base);
        if(modu) base %= mod;
        exp >>= 1;
    }
    return result;
}
int64_t bpow(int b, int e){
    int64_t result = 1,base = b, exp = e;
    while (exp > 0) {
        if (exp & 1){
            result = ((int64_t)result * base) ;
        }
        base = ((int64_t)base * base);
        exp >>= 1;
    }
    return result;
}
bool isPerfectSquare(long double x){long double sr = sqrt(x); return ((sr - floor(sr)) == 0);} 
bool isIn(string &s2, string &s1){if (s1.find(s2) != string::npos) return true;return false;}
bool isSorted(vi &arr){for(int i=0;i<arr.size()-1;i++) if(arr[i] > arr[i+1]) return false;return true;}
void print_v(vi &arr){for(auto x: arr) cout << x <<',';cout << "\b \n";}

int TEST_CASES = 0;
void submain(){
    int n;
    cin >> n;
    int k = n/2;
    ll ans = 0;
    if(n&1){
        ans = (k+1)*(k+2) + (k+2)*(k+1);
    }else{
        ans = (k+1)*(k+1);
    }
    cout << ans << '\n';
    

}

int main()
{
	// ios_base::sync_with_stdio(false);
	// cin.tie(NULL);
    // freopen("in.txt", "w", stdout);
    send help
    if(TEST_CASES){
        int t;
        cin >> t;
        while(t--){
            submain();
        }
    }else{
        submain();
    }
    
	return 0;
    
}
