include<stdio.h>
int count,sum,N;
int main(){
scanf("%d",&N);
for(int i = 1;i <= N;i ++){
count = 1;
for(int j = 1;j <= i;j ++)
count *= j;
sum += count;
}
printf("%d\n",sum);
}
int count,sum,N;
int main(){
scanf("%d",&N);
for(int i = 1;i <= N;i ++){
count = 1;
for(int j = 1;j <= i;j ++)
count *= j;
sum += count;
}
printf("%d\n",sum);
}