#include <bits/stdc++.h> using namespace std; typedef long long LL; int n; LL res; int main() { cin >> n; LL f = 1; for (int i = 1; i <= n; i++) { f *= i; res += f; } cout << res ; return 0; }