#include <bits/stdc++.h>
using namespace std;
const int N = 505;
int n;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  cin >> n;
  cout << ((n - 1) * (n + 1) * n) / 3 - 2;
}
