#include <iostream>  
using namespace std;
 
long factorial(long);
 
int main(void) 
{
    long long n;        
    cin >> n;
 
    cout << factorial(n) ; 
}
 
long factorial(long num) 
{
    long temp;
 
    if(num <= 1) return 1;
 
    temp = num * factorial(num - 1);  

    return temp;
}