#include <iostream>

using namespace std;

int Factorial(int x)
{
    if(x == 1)
    {
        return x;
    }
    else
    {
        x = x*Factorial(x-1);
    }

}

int main()
{
    int y;

    cin >> y;

    cout << Factorial(y) << endl;
}