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