#include<bits/stdc++.h>
using namespace std;

int main() {
    size_t input;

    cin >> input;

    if(input==0)
        input=1;
    else {
        for(size_t i=input-1; i>0; i--)
            input*=i;
    }

    cout << input;
}