program sample
    implicit none
    character(100)::s,t
    integer(8) :: i,j,k,m,n
    integer(8)::a,b,c,d
    integer(8),allocatable::x(:),y(:)
  
    read(*,*) n
    if(mod(n,2)==1)then
        write(*,*)0
        stop
    elseif(n<10)then
        write(*,*)0
        stop
    endif
    n=n/10
   
    m=n
    do i=1,30
        
        m=m+n/(5**i)
        

    end do
    write(*,*)m


   
    stop
end program sample
  

