#include<stdio.h>
#include <string>
#include <iostream>
using namespace std;


int factorial_loop(unsigned int n);

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


cin>>n;

if(0<n&&n<21) ;
else return 0;

	result1 =factorial_loop(n);

	cout<<result1;
	return 0;

}
int factorial_loop(unsigned int n) {
    int result = 1;
    int k;

    for(k = 1; k <= n; k++) {
        result *= k;
    }
    return result;
}