//by azidoazideazide(c2n14)
#include<iostream>
#include<string>
#include<cmath>
#include<algorithm> //#include<map>
#include<vector>
using namespace std;
typedef long long ll;
//#include<fstream>
//ifstream fin("rps.in");
//ofstream fout("rps.out");
//#define pb push_back
ll fact(ll n){
  if(n==1) return 1;
  else return n*fact(n-1);
}
int main(){
	ios::sync_with_stdio(0);
	ll n;
  cin>>n;
  cout<<fact(n)<<endl;
return 0;
}
