#include <iostream>
#include <vector>

#define BASE ((unsigned long long int)1<<32)
#define BASEMASK (BASE - 1)

void compute(std::vector<unsigned long long int>& number, int N)
{
        unsigned long long int carry, res;
        number.push_back(1);
        for (int n = 2; n <= N; ++n) {
                carry = 0;
                for (int i = 0; i < number.size(); ++i) {
                        res = number[i] * n + carry;
                        carry = res >> 32;
                        number[i] = res & BASEMASK;
                }
                while (carry) {
                        number.push_back(carry & BASEMASK);
                        carry >>= 32;
                }
        }

}

int main()
{
        std::vector<unsigned long long int> number;
        int n;
        std::cin >> n;
        compute(number, n);    
        return 0;
}