#include <bits/stdc++.h>
using namespace std;
 
int main() {
  long long a;
  cin >> a;
  long long ans = 0;
if(a % 2 == 0){
  a /= 2;
  while(a >= 5){
    a /= 5;
    ans += a;}
    }
  cout << ans << endl;
 }