FACTMUL - Product of factorials

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

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

hide comments
2013-08-21 07:15:52 [Lakshman]
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
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.