#include<iostream>
using namespace std;

long long factorial(long long n) {
   if (n == 0)
      return 1;
   else
      return (n * factorial(n-1));
}


int main()
{
    long long num;
    cin >> num;
    cout << (long long) factorial((long long) num);
    return 0;
}