/*
#include<cstdio>
#define syy myson
using namespace std;
int n,lie[21]={0},ans,i;
void search(int x)
{
if(x>n)
{
ans++;
return;
}
for(i=1;i<=n;i++)
{
if(!lie[i])
{
lie[i]=1;
search(x+1);
lie[i]=0;
}
}
}
int Main()
{
//freopen("rook.in","r",stdin);freopen("rook.out","w",stdout);
scanf("%d",&n);
search(1);
printf("%d",ans);
return 0;
}
int main(){;}
int syy=Main();
*/
#include<cstdio>
#define syy myson
using namespace std;
int n,i;
long long ans=1;
int Main()
{
freopen("rook.in","r",stdin);freopen("rook.out","w",stdout);
scanf("%d",&n);
for(i=1;i<=n;i++)ans*=i;
printf("%lld",ans);
return 0;
}
int main(){;}
int syy=Main();