#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  long long int n, k = 2;
  cin >> n;
  long long int s = 0;
  while (k < n) {
    s += k * (k + 1);
    k++;
  }
  cout << s << endl;
  return 0;
}
