#include <bits/stdc++.h>
using namespace std;
int main() {
  long long a[505];
  a[3] = 6;
  a[4] = 18;
  for (int i = 5; i < 501; i++) {
    a[i] = a[i - 1] + i * (i - 1);
  }
  int c;
  while (cin >> c) {
    cout << a[c] << endl;
  }
}
