#include<iostream>

using namespace std;

int facctorialMethod(int k);

int main(){
    int number;
    cin>>number;
    cout<<facctorialMethod(number)<<endl;
}

int facctorialMethod(int k){
    int sum = 1;
    for (int i = 1; i <= k; ++i)
    {
        sum *= i;
    }
    return sum;
}