//keep calm :)
#include <bits/stdc++.h>
#define float long double
#define int long long
//#define ll long long
#define PB push_back
#define MP ma ke_pair
#define ss second
#define ff first
#define PI 3.1415926535897932384
#define inf 9e18
#define fastrack ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
using namespace std;
const int M = 2 * 1e3 + 7, mod = 998244353;

signed main(){
    fastrack;
    //int tt; cin >> tt; while(tt--)
    {
        int n;
        cin >> n;
        int x = pow(-1, n);
        cout << 1 + ( 3*n*(n + 4) + 2 - x*(n*(n + 4) + 2) )/8 << "\n";
    }
    return 0;
}
