#include <bits/stdc++.h>
using namespace std;
long long dp[505][505];
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long n;
  cin >> n;
  vector<long long> A(n);
  for (long long i = 0; i < n; ++i) {
    A[i] = i + 1;
  }
  vector<vector<long long>> dp(n, vector<long long>(n, 0));
  for (long long i = n - 3; i >= 0; i--) {
    for (long long j = i + 2; j < n; j++) {
      if (j - i == 2)
        dp[i][j] = A[i] * A[i + 1] * A[i + 2];
      else {
        dp[i][j] = 1e9;
        for (long long k = i + 1; k < j; k++) {
          dp[i][j] = min(dp[i][j], dp[i][k] + A[i] * A[k] * A[j] + dp[k][j]);
        }
      }
    }
  }
  cout << dp[0][n - 1];
}
