Skip to main content
LIVE CONTEST: ALGOR Contest: Round #4 (Special Challenge) is live now!

~/algor $ cat problems/sonlar-faktorial-nollari

Trailing zeros of a factorial

Easy 1000 ms 128 MB 24%
Share

You are given a positive integer $n$. Find how many zeros the decimal notation of $n! = 1 \cdot 2 \cdot \ldots \cdot n$ ends with. For example, $10! = 3628800$ ends with two zeros.

Among the factors of the factorial the multiples of five are highlighted, with the number of zeros they give

Input

One positive integer $n$.

Output

One integer — the number of trailing zeros of $n!$.

Note

$1 \le n \le 10^{18}$

Examples

Input #1
25
Output #1
6
Input #2
4
Output #2
0

Sign in to submit a solution

Signing up is free and takes a minute.