#include using namespace std; using ll = long long int; int main(){ ll n; cin >> n; ll ans = 0; ans += (((n-1)/2)*4+3) * ((n+1)/2); ans += ((n/2)*4+1) * ((n+2)/2); ans += n*2+1; //cerr << ans << endl; //cerr << ((n/2)*2+n%2)*2+1 << " " << ((n/2)*2)*2+1 << " " << n*2+1 << endl; ans += (((n/2)*2+n%2)*2+1)*((n-1)/2); ans += (((n/2)*2)*2+1)*((n-2)/2); if(n == 1) ans--; cout << ans << endl; return 0; }