#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-loops")
#pragma optimize("SEX_ON_THE_BEACH")
using namespace std;
using ll = unsigned long long int;
using ull = unsigned long long int;
using dd = double;
using ldd = long double;
using si = short int;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
ll get_seed(string s) {
  ll ans = 0;
  for (int i = 0; i < s.size(); ++i) ans += s[i];
  return ans;
}
bool cmp(pair<int, int> a, pair<int, int> b) { return a.second > b.second; }
int main() {
  ios_base::sync_with_stdio(0);
  cout.tie(0);
  cin.tie(0);
  int n, k;
  cin >> n;
  ll ans = 0;
  for (int i = 2; i < n; ++i) {
    ans += i * i + i;
  }
  cout << ans;
  return 0;
}
