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