#include <bits/stdc++.h>
using namespace std;
signed main() {
  cin.tie(0)->sync_with_stdio(0);
  long long n;
  cin >> n;
  long long ans = 0;
  for (long long i = 2; i < n; i++) {
    ans += 1 * i * (i + 1);
  }
  cout << ans << "\n";
}
