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>
using namespace std;
#define pi 3.14159265359
#define int long long
#define pii pair<int,int>
#define ld long double
const int mod=1e9 + 7;
 
int dx[]={-1, 0, 1, 0};
int dy[]={0, -1, 0, 1};
 
 
 
 
int32_t main()
{
ios::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
 

// int n;
// cin>>n;
// vector<int>v(n);  map<int,vector<int>>m;
// for(int i=0;i<n;i++)
// {
//   cin>>v[i];
//   m[v[i]].push_back(i);
// }



// vector<int>x;
// if(m.find(1)==m.end())
// {
//   cout<<-1; return 0;
// }
// x.push_back(m[1][0]);

// for(int i=2;i<=n;i++)
// {
//   if(m.find(i)==m.end())break;
//   if(x.size()!=i-1)break;

//   for(int j=0;j<m[i].size();i++)
//   {
//     if(m[i][j]>x.back())
//     {
//       x.push_back(m[i][j]); break;
//     }
//   }
// }

// cout<<n-x.size()<<"\n";

int n;
cin>>n;

if(n%2==1)
{
  cout<<0; return 0;
}


int k=n/2;
 int cnt=0;
 int x=5;
 while(x<=k)
 {
   cnt+=k/x;
   x*=5;
 }

 cout<<cnt<<"\n";


}