#include using namespace std; using ll = long long; int main(){ ll K; cin >> K; cout << K*K*4+2 << endl; return 0; }