#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
int main() // 1-n 相加
{
int a = 1;
int n = 0;
int c = 1;
int d = 0;
scanf("%d", &n);
for (a = 1; a <= n; a++)
{
c = c * a;
d += c;
}
printf("%d\n", d);
return 0;
}
int main() //1-n相乘
{
int a = 1;
int n = 0;
int c = 1;
scanf("%d", &n);
for (a = 1; a <=n; a++)
{
c = c * a;
}
printf("%d\n", c);
return 0;
}