program double_factorial
  implicit none
  integer(8) :: n, x = 0
  read(*,*) n
  if (mod(n,2) == 1) then
    write(*,'(i0)') 0
    stop
  end if
  n = n/2
  do while (n > 0)
    x = x+n/5
    n = n/5
  end do
  write(*,'(i0)') x
end program double_factorial