/*#include <stdio.h>
int f(int n)
{
if(n<1) return 1;
else
return f(n-1)*n;
}
int main()
{
int n;
scanf("%d",&n);
printf("%d",f(n));
}*/
/*#include <stdio.h>
int f(int n)
{
if(n<=2) return 1;
else return f(n-1)+f(n-2);
}
int main()
{
int n;
scanf("%d",&n);
printf("%d",f(n));
}*/
/*#include <stdio.h>
int memo[51][51]={};
int f(int n,int m)
{
if(memo[n][m]!=0) return memo[n][m];
if(n==1||m==1) return 1;
else return memo[n][m] = (f(n-1,m)+f(n,m-1))%100000000;
}
int main()
{
int n,m;
scanf("%d %d",&n,&m);
printf("%d",f(n,m));
}*/
/*#include <stdio.h>
int memo[201]={};
int f(int n)
{
if(memo[n]!=0) return memo [n];
if(n<=2) return 1;
else return memo [n]=(f(n-1)+f(n-2))%10009;
}
int main()
{
int n;
scanf("%d",&n);
printf("%d",f(n));
}*/
#include <stdio.h>
int f(int n,int m)
{
if(n==1||m==1) return 1;
else return f(n)*m
}
int main()
{
int n;
scanf("%d",&n);
printf("%d",f(n));
}