program sample
    implicit none
   
    integer(8) :: a,b,c
    
  
    read(*,*)a,b,c
    if(b==0)then
        write(*,*)1
    elseif(a==0)then
        write(*,*)b/c+1
    else
        write(*,*)b/c-(a-1)/c
    end if
    stop
end program sample
  

