#includevoid main() { int i,n,t,s;scanf("%d",&n); t=1; s=0;for ( i=1;i<=n;i++ ) { t*=i; s+=t; }printf("%d\n",s);}