#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n;
  cin >> n;
  long long ans = 0;
  int x = 2;
  while (true) {
    ans += x * (x + 1);
    x = x + 1;
    if (x == n) break;
  }
  cout << ans << endl;
}
