#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long n;
  cin >> n;
  long long a[n];
  for (int i = 0; i < n; ++i) {
    a[i] = i + 1;
  }
  long long ans = 0;
  long long i = 1, j = 1, k = 2;
  for (int q = 0; q < n - 2; ++q) {
    ans += i * a[j] * a[k];
    j = (j + 1) % (n);
    k = (k + 1) % (n);
  }
  cout << ans;
  return 0;
}
