Given a positive integer n, computing the factorial n! is easy. This time the direction is reversed: you are given n! and have to recover n.
Input
The first line contains n! for some natural number n. The number of digits of n! is at most 106. The input is always the factorial of some natural number, and n is at least 1.