#include <iostream>

using namespace std;
// A x B = AB
int n,factorial;
int hasil = 1;
int main()
{
    cin >> n;
    if(n == 0)
    {
    cout << hasil;
    }
    while(n != 1)
    {
        factorial = n;
        n = n-1;
        hasil = hasil*factorial;

    }
    cout << hasil;
}