import java.util.Scanner;

fun main (args: Array<String>) {
  val input = Scanner(System.`in`)
  
  while (input.hasNext()) {
    val N = input.nextLong();
    
    if (N % 2 != 0L) {
      println(0)
    } else {
      val halfN = N / 2
      var mod = 5L
      var count = halfN / 5
      
      do {
        mod *= 5
        count += halfN / mod
      } while (halfN / mod > 0L)
      
      println(count)
    }
    
  }
}