#include <bits/stdc++.h>
using namespace std;
int main() {
  int count, num, val[4010], tmp[4010];
  val[0] = 1;
  val[1] = 4;
  tmp[1] = 6;
  for (int a = 1; a < 4010; a++) {
    tmp[a + 1] = tmp[a] + a + 4;
  }
  for (int a = 1; a < 4010; a++) {
    val[a + 1] = val[a] + tmp[a];
  }
  while (cin >> num) {
    cout << val[num] << endl;
  }
}
