#include<stdio.h>
#include <string>
#include <iostream>
#include <vector>
#include <sstream>
#include<math.h>
#include <algorithm>
using namespace std;


int factorial_recursive(int n);

int main(void)
{
  int n;
   int result1;


cin>>n;
if(0<n&&n<21) ;
else return 0;
	result1 = factorial_recursive(n);

	cout<<result1<<endl;

}
int factorial_recursive(int n) {
		if (n > 0) {
        return factorial_recursive(n - 1) * n;
    } else {
        return 1;
    }
}