#include <bits/stdc++.h>
using namespace std;
const long long M = 1e9 + 7;
const long long INF = 1e18;
const double _e = 10e-6;
const int maxn = 1e3 + 10;
const int matSize = 9;
const int dx[4] = {0, 0, 1, -1}, dy[4] = {1, -1, 0, 0};
const int _dx[8] = {-1, -1, -1, 0, 0, 1, 1, 1},
          _dy[8] = {-1, 0, 1, -1, 1, -1, 0, 1};
int x, y, z;
char c;
int n;
int main() {
  while (~scanf("%d", &n)) {
    long long ans = 0;
    for (int i = 3; i <= n; i++) ans += 1ll * i * (i - 1);
    printf("%lld\n", ans);
  }
  return 0;
}
