#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  int sum;
  int i;
  while (scanf("%d", &n) != EOF) {
    sum = 0;
    for (i = 1; i <= n - 2; i++) {
      sum += (i + 1) * (i + 2);
    }
    cout << sum << endl;
  }
  return 0;
}
