#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n;
  cin >> n;
  long long sum = 0;
  for (int i = 3; i <= n - 1; ++i) {
    sum += i * (i - 1);
  }
  sum += n * (n - 1);
  cout << sum;
  return 0;
}
