PROGRAM ATCODER

implicit none
integer :: a,b,x

read(*,*) a,b,x

if(a == 0)then
  write(*,'(i0)') b/x+1
else
  write(*,'(i0)') b/x-(a-1)/x
end if

contains
!!!!!! サブルーチンは↓
!!!!!!

END PROGRAM ATCODER