#include<bits/stdc++.h>
using namespace std;
int main(){
int a=1,c=1,b;
cin>>b;
while(a<=b){
c=a*c;
a++;
}
cout<<c;
}
/**************************************************************
Problem: 1004
User: toughuatao1
Language: C++
Result: Accepted
Time:18 ms
Memory:2072 kb
****************************************************************/