#include <bits/stdc++.h>
using namespace std;
int n;
long long dp[505][505];
long long go(int l, int r) {
  int m = (r + n - l) % n;
  if ((r + n - l) % n == 2)
    return dp[l][r] = (l + 1) * ((l + 1) % n + 1) * ((l + 2) % n + 1);
  if ((r + n - l) % n < 2) return 0;
  if (dp[l][r]) return dp[l][r];
  dp[l][r] = 1e9;
  for (int i = (l + 2) % m; i != (r + 1) % m; i = (i + 1) % m) {
    if (l == 0 and r == 3) cout << i;
    long long t = (l + 1) * ((l + 1) % n + 1) * (i + 1);
    t += go(i, l) + go((l + 1) % n, i);
    dp[l][r] = min(dp[l][r], t);
  }
  if (dp[l][r] == 1e9) cout << l << " " << r << endl;
  return dp[l][r];
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cin >> n;
  long long ans = 0;
  for (int i = 2; i < n; i++) ans += i * (i + 1);
  cout << ans;
}
