#include<bits/stdc++.h> using namespace std; int main(){ long long n; cin >> n; cout << 2*n*n+1; return 0; }