import numpy as np

a, b, x = list(map(int, input().split()))

upper = b // x

lower = (a-1)//x



ans = upper - lower



print(ans)
a, b, x = list(map(int, input().split()))

upper = b // x

lower = (a-1)//x



ans = upper - lower



print(ans)
import numpy as np

a, b, x = list(map(int, input().split()))
upper = b // x
lower = (a - 1) // x
ans = upper - lower
print(ans)

a, b, x = list(map(int, input().split()))
upper = b // x
lower = (a - 1) // x
ans = upper - lower
print(ans)

-import numpy as np -