#include <bits/stdc++.h>
int dx[] = {0, 0, 1, -1, 1, -1, 1, -1};
int dy[] = {1, -1, 0, 0, -1, 1, 1, -1};
const double pi = acos(-1), eps = 1e-9;
const int OO = 0x3f3f3f3f, N = 1e6 + 5, mod = 1e9 + 7;
using namespace std;
long long gcd(long long x, long long y) { return (!y) ? x : gcd(y, x % y); }
long long lcm(long long x, long long y) { return ((x / gcd(x, y)) * y); }
void file() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
}
bool cmp(pair<int, int> p1, pair<int, int> p2) {
  return (p1.first - p1.second) < (p2.first - p2.second);
}
int main() {
  file();
  int n;
  cin >> n;
  long long cur = 1, sum = 0;
  for (int i = 2; i <= n - 1; i++) {
    cur *= i;
    cur *= (i + 1);
    sum += cur;
    cur = 1;
  }
  cout << sum << '\n';
  return 0;
}
