//NoorBaizura bt Mohd Zin
// 1111168

#include <iostream>

using namespace std;

int main()
{
    int x,count=1;
    
    cin >> x;
    
    if (x<=20)
    {
        for (int i=1; i<=x; i++)
            count *= i;
        
        cout << count;
    }
    
    else
        cout << "error";
    
//    system ("pause");
    return 0;
    
}