#include<stdio.h> #define MaxSize 3000 void check(int* A, int n) { int i, j; for (i = 0; i < 8; i++) { for (j = n - 1; j > 0; j--) { if (A[j] >= 10) { A[j - 1] += A[j] / 10; A[j] = A[j] % 10; } } } } int main() { int A[MaxSize] = {0}, i, j, k, n = MaxSize; while (scanf("%d", &k) != EOF) { for (i = 0; i < n; i++)A[i] = 0; A[n - 1] = 1; j = 1; while (j <= k) { for (i = 0; i < n; i++)A[i] *= j; j++; check(A, n); } for (i = 0; A[i] == 0; i++); while (i < n) { printf("%d", A[i]); i++; } printf("\n"); } return 0; }