#include <bits/stdc++.h>
using namespace std;
const int inf = 0x3f3f3f3f;
const long long llinf = 0x3f3f3f3f3f3f3f3f;
template <typename INint>
inline void IN(INint &x) {
  x = 0;
  int f = 1;
  char c;
  cin.get(c);
  while (c < '0' || c > '9') {
    if (c == '-') f = -1;
    cin.get(c);
  }
  while (c >= '0' && c <= '9') {
    x = x * 10 + c - '0';
    cin.get(c);
  }
  x *= f;
}
template <typename INint>
inline void OUT(INint x) {
  if (x > 9) OUT(x / 10);
  cout.put(x % 10 + '0');
}
const int maxn = int(550);
long long dp[maxn][maxn];
long long dfs(int le, int ri) {
  if (le + 1 >= ri) return 0;
  long long &ret = dp[le][ri];
  if (ret == -1) {
    for (int i = le + 1; i < ri; ++i) {
      if (i == le + 1)
        ret = dfs(le, i) + dfs(i, ri) + 1ll * le * ri * i;
      else
        ret = min(ret, dfs(le, i) + dfs(i, ri) + 1ll * le * ri * i);
    }
  }
  return ret;
}
int main() {
  int T(1), times(0);
  std::ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  while (++times, T--) {
    long long n;
    cin >> n;
    memset(dp, -1, sizeof(dp));
    cout << dfs(1, n) << endl;
  }
  return 0;
}
