Trailing Zeros

3.9

210 votes
Basic Programming, Simple-math, Easy
Problem

Given a number find the number of trailing zeroes in its factorial.

Input Format

A single integer - N

Output Format

Print a single integer which is the number of trailing zeroes.

Input Constraints

1 <= N <= 1000

Problem Setter: Practo Tech Team

Time Limit: 1
Memory Limit: 256
Source Limit:
Explanation

10! = 3628800 has 2 zeros in the end.

Editor Image

?