#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, ans = 0, p = 2;
  scanf("%d", &n);
  for (int i = 3; i <= n; i++) {
    ans += (p * i);
    p = i;
  }
  printf("%d", ans);
  return 0;
}
