program ABC_048_A_Betweenaandb
   implicit none
   integer(8) a, b, x
   read(*, *) a, b, x
   if(mod(a, x) == 0) then
      write(*, *) (b / x) - (a / x) +1
   else
      write(*, *) (b / x) - (a / x)
   end if
end program ABC_048_A_Betweenaandb