#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  while (cin >> n) {
    unsigned long long int num = 6, e = 6;
    int index = 6;
    if (n < 3) {
      cout << "0" << endl;
      continue;
    }
    if (n == 3) {
      cout << "6" << endl;
      continue;
    }
    int differ = n - 3;
    for (int i = 0; i != differ; ++i) {
      num += index;
      e += num;
      index += 2;
    }
    cout << e << endl;
    num = 6;
    index = 6;
    e = 6;
  }
}
