#include <bits/stdc++.h>
using namespace std;
const long long INF = 0x3f3f3f3f3f3f3f3f;
const int maxn = 505;
long long dp[maxn][maxn];
void run_case() {
  int n;
  cin >> n;
  for (int i = n - 2; i >= 1; --i) {
    for (int j = i + 2; j <= n; ++j) {
      dp[i][j] = INF;
      for (int k = i + 1; k < j; ++k)
        dp[i][j] = min(dp[i][j], dp[i][k] + dp[k][j] + i * j * k);
    }
  }
  cout << dp[1][n];
}
int main() {
  ios::sync_with_stdio(false), cin.tie(0);
  cout.flags(ios::fixed);
  cout.precision(10);
  run_case();
  cout.flush();
  return 0;
}
