#include #include int main() { int n = 0; int m = 1e9 + 7; scanf("%d", &n); long long int a = 1; for (int i = 2; i <= n; ++i) { a = (a * i) % m; } printf("%d\n", a); }