#include <stdio.h>
#include <iostream>

int main(){
    long long num, factorial=1;
   scanf("%lld", &num);
    for(;num > 0; num--){
        factorial *= num;
    }
printf("%lld", factorial);
    return 0;
}