#include <stdio.h>

int main() {
    long ans = 1;
    long i;
    scanf(" %ld", &i);
    for (; i > 1; i--) {
        ans *= i;
    }
    printf("%ld\n", ans);
}