#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n;
  cin >> n;
  vector<pair<long long int, long long int> > v;
  for (long long i = 3; i <= n; i++) {
    v.push_back(make_pair(i, i - 1));
  }
  long long ans = 0;
  for (auto it : v) {
    ans += (it.first * it.second);
  }
  cout << ans << endl;
}
