#include <bits/stdc++.h>
using namespace std;
double START_TIME;
void exit() { exit(0); }
template <typename A, typename B>
ostream& operator<<(ostream& os, pair<A, B> p) {
  os << "(" << p.first << ", " << p.second << ")";
  return os;
}
template <typename T>
ostream& operator<<(ostream& os, vector<T> v) {
  for (int i = 0; i <= (int)v.size() - 1; i++) {
    os << v[i] << " ";
  }
  return os;
}
template <typename T>
ostream& operator<<(ostream& os, set<T> t) {
  for (auto z : t) {
    os << z << " ";
  }
  return os;
}
template <typename T1, typename T2>
ostream& operator<<(ostream& os, map<T1, T2> t) {
  cerr << endl;
  for (auto z : t) {
    os << "\t" << z.first << " -> " << z.second << endl;
  }
  return os;
}
const int MAX = 541;
const long long INF = 1e18;
int n;
long long d[MAX][MAX];
int u[MAX][MAX];
int getdist(int l, int r) {
  int res = r - l;
  if (res < 0) res += n;
  return res;
}
long long rec(int l, int r) {
  if (getdist(l, r) == 1) return 0LL;
  if (u[l][r]) return d[l][r];
  long long res = INF;
  for (int i = l + 1; i <= r - 1; i++) {
    long long cur = (long long)l * r * i;
    long long v1 = rec(l, i);
    long long v2 = rec(i, r);
    res = min(res, cur + v1 + v2);
  }
  u[l][r] = 1;
  return d[l][r] = res;
}
void solve() {
  long long ans = INF;
  for (int i = 2; i <= n - 1; i++) {
    for (int j = i + 1; j <= n; j++) {
      long long v1 = rec(1, i);
      long long v2 = rec(i, j);
      long long v3 = rec(j, 1);
      long long v0 = i * j;
      ans = min(ans, v0 + v1 + v2 + v3);
    }
  }
  printf("%lld\n", ans);
}
int main() {
  scanf("%d", &n);
  solve();
  exit();
  return 0;
}
