Per is obsessed with factorials. He calculates them, estimates them, reads about them, draws them, and dreams about them. The value 12!=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! 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! leaves 4790016, whose last 3 digits are 016.
You are given an integer n. Remove every trailing zero from n! and find the last 3 digits of what remains. If fewer than 3 digits remain, find all of them.
The first line contains one integer n (1≤n≤107).
Print, on one line, the last 3 digits of 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.