#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 5;
int main() {
  vector<long long> v;
  int n, sum = 0, x = 1;
  cin >> n;
  if (n == 1) return cout << 1, 0;
  for (long long i = 0; i < n; i++) {
    v.push_back(x);
    x += 2;
  }
  for (long long i = 0; i < v.size(); i++) {
    sum += v[i];
  }
  v.pop_back();
  for (long long i = v.size() - 1; i >= 0; i--) sum += v[i];
  cout << sum;
  return 0;
}
