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