Three Digits

No attempts yetTime limit1sMemory limit256 MB

Problem

Per is obsessed with factorials. He calculates them, estimates them, reads about them, draws them, and dreams about them. The value 12!=47900160012! = 479001600 is tattooed on his back.

He noticed long ago that a factorial ends with several zeros, and he wrote a program that counts those trailing zeros. For example 12!12! ends with 600, so it has 2 trailing zeros. Now he wants to look one step further, at the 3 digits that sit right before the trailing zeros. Removing the trailing zeros from 12!12! leaves 4790016, whose last 3 digits are 016.

You are given an integer nn. Remove every trailing zero from n!n! and find the last 3 digits of what remains. If fewer than 3 digits remain, find all of them.

Input

The first line contains one integer nn (1n1071 \le n \le 10^7).

Output

Print, on one line, the last 3 digits of n!n! after every trailing zero is removed. Print a leading 0 as it is. If the remaining value is 4032, print 032. If the remaining value has fewer than 3 digits, print that value as it is.