#include <bits/stdc++.h>
using namespace std;
long long min(long long x, long long y) { return (x <= y) ? x : y; }
long long cost(long long i, long long j, long long k) { return i * j * k; }
long long mTCDP(long long n) {
  if (n < 3) return 0;
  long long table[n + 1][n + 1];
  for (long long gap = 1; gap <= n; gap++) {
    for (long long i = 1, j = gap; j <= n; i++, j++) {
      if (j < i + 2)
        table[i][j] = 0;
      else {
        table[i][j] = 1000000000;
        for (long long k = i + 1; k < j; k++) {
          long long val = table[i][k] + table[k][j] + cost(i, j, k);
          if (table[i][j] > val) table[i][j] = val;
        }
      }
    }
  }
  return table[1][n];
}
int main() {
  long long n;
  cin >> n;
  cout << mTCDP(n) << endl;
  ;
  return 0;
}
