#include "cstdio"

int main() {
    int n;
    scanf("%d", &n);
    long long result = 1;
    while (n > 0) {
        result *= n;
        --n;
    }
    printf("%lld", result);
    return 0;
}