#include<bits/stdc++.h> using namespace std; int main(){ short a; cin>>a; for(int i=1;i<=10;i++){ if(i<=a){ a*=i; }else{ break; } } cout<<a; }