#include <bits/stdc++.h>
using namespace std;




int main(void){
  long int N, M;
  cin >> N;
  M = 10;
  long int count = 0;
  if (N % 2 == 0){
    while(N >= M){
      count += N / M;
      M *= 5;
    }
  }
  
  cout << count << endl;
}