#include<iostream>
#include<cstdio>
#include<algorithm>
using namespace std;

int main(){
   int i,n;
   int ans=1;
   cin>>n;
   
   for(i=n;i>1;i--) ans*=i;
   
   printf("%d\n",ans);
   return 0;
}