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)

 /************************************************
 # @Author:      miniLCT
 # @DateTime:    2019-12-22 20:17:32
 # @Description: You build it.You run it
 # @More: If lots of AC,try BF,dfs,DP
 ***********************************************/
#include <bits/stdc++.h>

using namespace std;
#define eps 1e-8
#define int  long long 
#define close ios::sync_with_stdio(false); cin.tie(0); cout.tie(0);
typedef long long ll;
const int maxn = 1e6;
const int INF = 1e9;
const ll linf = 0x3f3f3f3f3f3f3f3f;
const double PI = acos(-1.0);
typedef long long ll;
ll mul(ll a,ll b) {
    ll ret=0;
    while(b) {
        if(b&1)
            ret=(ret+a);
        a=(a<<1);
        b=b>>1;
    }
    return ret;
}
ll quickPow(ll a,ll b) {
    ll ret=1;
    while(b) {
        if(b&1)
            ret=mul(ret,a);  //直接相乘的话可能会溢出
        a=mul(a,a);
        b=b>>1;
    }
    return ret;
}
int32_t main()
{
	close;
	ll n;
	cin >> n;
	if(n & 1){
		cout << 0 << endl;
		return 0;
	}
	else {
		int nn = n;
		int tmp = 0;
		while(nn != 0){
			tmp++;
			nn /= 5;
		}
		tmp--;
		int ans = 0;
		for(int i = 1; i <= tmp;i++){
			ans += n/(2*quickPow(5,i));
		}
		cout << ans <<endl;
	}
}
//1000000000000000000
//124999999999999995
//249999999999999770
//199999999999999980
// 75000000000000205
//100000000000000000


/******************************************************
 stuff you should look for
  * int overflow, array bounds
  * special cases (n=1?), set tle
  * do smth instead of nothing and stay organized
*******************************************************/