#include<stdio.h> int main() { int n,s=0,b=1,a=1; scanf("%d",n); while(b<=n) { a*=b; b++; s+=a; } printf("%d",s); return 0; }