#include <bits/stdc++.h>
const int Inf = 2 * 1000 * 1000 * 1000;
long long LINF = (long long)4e18;
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  long long ans = 0;
  for (long long i = 2; i + 1 <= n; i++) {
    ans += i * (i + 1);
  }
  cout << ans;
  return 0;
}
