#include <iostream>
using namespace std;

int factorial(int n);

int main()
{
    int x;
    while (cin >> x) {
        cout << factorial(x) << endl;
    }
    return 0;
}
