#include "iostream"
#include "cmath"

int main(int argc, char const *argv[])
{
  int n;
  double factorial=1;
  std::cin >> n;
  for (int i = 1; i <= std::abs(n); ++i)
    factorial *= i;
  if (n<0) std::cout << -1*factorial << std::endl;
  else std::cout << factorial << std::endl;
}