cho.sh
Notes
Loading...

Number of Trailing Zeros in a Factorial

Time limit

2s

Memory limit

128 MB

Problem

Given an integer N, find how many consecutive zeros appear at the end of the decimal representation of N!.

Input

The first line contains an integer N.

  • 0 <= N <= 500

Output

Print the number of trailing zeros in N!.