#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> A, B;
  for (int i = 1; i <= n; i++) A.push_back(i);
  long long sum = 0;
  for (int i = 2; i < n; i++) sum += i * (i + 1);
  cout << sum << "\n";
}
