#include <bits/stdc++.h>
using namespace std;
long long power(long long x, long long y);
int count(string s, int idx) {
  int t1 = 0, t2 = 0;
  for (int i = idx; i >= 0; i--) {
    if (s[i] == '<')
      t1++;
    else
      break;
  }
  for (int i = idx + 1; i < s.length(); i++) {
    if (s[i] == '>')
      t2++;
    else
      break;
  }
  return min(t1, t2);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n;
  cin >> n;
  long long ans = 0;
  for (int i = 2; i <= n - 1; i++) {
    ans += (i * (i + 1));
  }
  cout << ans;
  return 0;
}
long long power(long long x, long long y) {
  long long res = 1;
  x = x % 1000000007;
  while (y > 0) {
    if (y & 1) res = (res * x) % 1000000007;
    y = y >> 1;
    x = (x * x) % 1000000007;
  }
  return res;
}
