#include <bits/stdc++.h>
using namespace std;
using ll = long long;
void solve() {
  int n;
  cin >> n;
  ll sum = 0;
  for (ll i = n; i > 2; i--) {
    sum = sum + i * (i - 1);
  }
  cout << sum;
  return;
}
int main() { solve(); }
