#include<iostream>
using namespace std;

using lint = long long;

lint factorial(lint n){
    if(n == (lint)0){
        return (lint)1;
    }

    return n * factorial(n - 1);
}

int main(){
    lint n;
    cin >> n;
    cout << factorial(n) << endl;

    return 0;
}
