#include <bits/stdc++.h>
using namespace std;
long long mark[5010];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(), cout.tie();
  long long n, b = 4;
  ;
  long long a[110];
  a[1] = 1;
  for (long long i = 2; i <= 100; i++) {
    a[i] = a[i - 1] + b;
    b += 4;
  }
  cin >> n;
  cout << a[n] << endl;
}
