#include <bits/stdc++.h>
int main() {
  int a = 1, b = 2, c = 3, m, s = 0, i;
  scanf("%d", &m);
  for (i = 0; i < (m - 3) + 1; i++) {
    s = s + a * b * c;
    b++;
    c++;
  }
  printf("%d\n", s);
}
