#include <iostream>
#include <cstdio>

using namespace std;

long Function(int x){
    if(x==1){
        return x;
    } else{
        return x* Function(x-1);
    }
}

int main() {
    long n;
    while (scanf("%ld",&n)!=EOF){
        printf("%ld",Function(n));
    }
    return 0;
}

题目的数据范围更大,用long型,替代符事ld