#include <iostream>
#include <iomanip>
using namespace std;

int main() {
  long long n, r=0;
  cin >> n;
  if(n%2!=0) cout << 0 << endl;
  else {
    for(long long d=10;d<=n;d*=5) r += n / d;
    cout << r << endl;
  }
}