#include<iostream> using namespace std; int main() { unsigned long long a,b,c,d; cin>>a; c=1; d=0; for(b=1;b<=a;b++){ c*=b; d+=c; } cout << d << endl; return 0; }