#include<stdio.h>
#include<string.h>
#include<stdlib.h>
int a[20000] = {0};
int carry = 0;
int digit = 1;
void jiecheng(int m){
int i, j;
int k;
a[0] = 1;
for(i = 2; i <= m; i++){
for(j = 0; j < digit; j++){
a[j] = a[j] * i + carry;
carry = a[j] / 10;
a[j] = a[j] % 10;
}
k = 0;
while(carry != 0){
a[digit] += carry % 10;
digit++;
carry = carry / 10;
}
}
}
int main()
{
int n;
int i;
scanf("%d", &n);
getchar();
jiecheng(n);
for(i = digit - 1; i >= 0; i--){
printf("%d", a[i]);
}
printf("\n");
return 0;
}