Factorial Trailing Zeroes

EasyMath
Next
Math

Count the number of zeros at the end of n! (n factorial). n! itself is far too large to compute, so work out the answer from the factors of n!.

Input

A single integer n.

Output

Print the number of trailing zeros of n!.

Constraints

0 <= n <= 10^9

Example 1
Input
5
Output
1

5! = 120 has one trailing zero.

Example 2
Input
25
Output
6

Five multiples of 5 plus one extra from 25 itself.

Hints

Factorial Trailing Zeroes - Easy Math Problem | Skill Shiksha