#include <iostream>
#include <string>
#include <algorithm>
#include <map>
#include <vector>
#include <deque>
#include <set>
#include <cstdio>
#include <utility>
#include <cmath>
#include <string.h>

using namespace std;

int main()
{

    int n;
    cin >> n;
    if(n%2)
    {
        cout << (n+2)*(n+2)/2 << "\n";
    }
    else
    {
        cout << ((((n+1)*(n+1)+1)/2)-n-1)/2+n+1 << "\n";
    }

    return 0;
}
