FACTMUL - Product of factorials

no tags 

You need to find the product of first n factorials 1! * 2! * ... * n! modulo 109546051211.

Input

One integer n (1 <= n <= 10000000)

Output

The answer.

Example

Input:
5

Output:
34560

hide comments
[Lakshman]: 2013-08-21 07:15:52

I don't know how people get AC in 0.0, is there any trick to solve this problem?

Last edit: 2013-08-21 18:28:31

Added by:Ashot Minasyan
Date:2013-08-20
Time limit:1s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:All except: ASM64