#include int main (void) { long input; long N = 1; scanf("%d", &input); if (input < 50) { for (long i = input; i >= 1; i--) { N = N * i % (long)1e12; } printf("%012ld\n", N); } else { printf("000000000000\n"); } return 0; }