#include <iostream>
#include <cstdlib>
#include <windows.h>
using namespace std;

float factorial(float n);

int main()
{
    float n;
    
    do
    {
    cout<< "Enter value : " ;
    cin >> n;
    
    }while(n>20);
    
    cout<< factorial(n) << endl;
    
    return 0;
}

float factorial(float n)
{
    int x;
    float sum=1;
    for(x=1; x<=n; x++)
    {
       sum = sum*x;
    }
    return sum;
}