#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int a[101], p = 4;
  a[0] = 1;
  for (long long int i = 1; i <= 100; i++) {
    a[i] = a[i - 1] + p;
    p = p + 4;
  }
  long long int n;
  cin >> n;
  cout << a[n - 1];
}
