#include <bits/stdc++.h>
using namespace std;
long long kq = 0;
int n, j = 2;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  for (int i = 1; i <= n - 2; i++) kq += (long long)j * (j + 1), j++;
  cout << kq;
}
