#include <bits/stdc++.h>
int main() {
  long long int N, answer, multiple;
  std::cin >> N;
  multiple = 10;
  answer = 0;
  if (N % 2 == 1) {
    std::cout << 0 << std::endl;
    return 0;
  }
  while (1) {
    if (multiple > N) {
      break;
    } else {
      answer += (long long int)(N / multiple);
      multiple = multiple * 5;
    }
  }
  std::cout << answer << std::endl;
  return 0;
}
