Problem:
Score : 500 points

Problem Statement

For an integer n not less than 0, let us define f(n) as follows:

f(n) = 1 (if n < 2)

f(n) = n f(n-2) (if n \geq 2)

Given is an integer N. Find the number of trailing zeros in the decimal notation of f(N).

Constraints

0 \leq N \leq 10^{18}

Input

Input is given from Standard Input in the following format:

N

Output

Print the number of trailing zeros in the decimal notation of f(N).

Sample Input 1

12

Sample Output 1

1

f(12) = 12 × 10 × 8 × 6 × 4 × 2 = 46080, which has one trailing zero.

Sample Input 2

5

Sample Output 2

0

f(5) = 5 × 3 × 1 = 15, which has no trailing zeros.

Sample Input 3

1000000000000000000

Sample Output 3

124999999999999995

Solution in C++14 (GCC 5.4.1) (judge verdict: Accepted)

#include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<(n);i++)
using namespace std;
typedef long long ll;

int main(){
    ll N;
    cin >> N;

    if(N %2 == 1){
        cout << 0 << endl;
    }

    else{
        N = N/2;
        ll a = N/5;
        ll b = a/5;
        ll c = b/5;
        ll d = c/5;
        ll e = d/5;
        ll f = e/5;
        ll g = f/5;
        ll h = g/5;
        ll i = h/5;
        ll j = i/5;
        ll k = j/5;
        ll l = k/5;
        ll m = l/5;
        ll n = m/5;
        ll o = n/5;
        ll p = o/5;
        ll q = p/5;
        ll r = q/5;
        ll s = r/5;
        ll t = s/5;
        ll u = t/5;
        ll v = u/5;
        ll w = v/5;
        ll x = w/5;
        ll y = x/5;
        ll z = y/5;

        cout << a + b + c + d + e + f + g + h + i + j + k + l + m + n + o + p + q + r + s + t + u + v + w + x + y + z << endl;
    }


}