#include <iostream>
#include <stdio.h>
typedef long long int64;
using namespace std;

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