Hex Factorial

Time Limit: 5000/2000 MS (Java/Others)

Memory Limit: 32768/32768 K (Java/Others)

Description

The expression N!, reads as the factorial of N, denoting the product of the first N positive integers. If the factorial of N is written in hexadecimal without leading zeros, can you tell us how many zeros are there in it? Take 15! as an example, you should answer "3" because (15)10! = (13077775800)16, and there are 3 zeros in it.

Input

The input contains several cases. Each case has one line containing a non-negative decimal integer N (N ≤ 100). You need to count the zeros in N! in hexadecimal. A negative number terminates the input.

Output

For each non-negative integer N, output one line containing exactly one integer, indicating the number of
zeros in N!.

Sample Input

1 15 -1

Sample Output

0 3

Hint

lcy

Source

2006 Asia Regional Xi-An (Preliminary)

提交代码