from decimal import *

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

ax = int(Decimal(a) / Decimal(x))

bx = int(Decimal(b) / Decimal(x))

am = a % x

bm = b % x

if ax == bx and am != 0 and bm != 0:

  print((0))

elif am == 0:

  print((bx - ax + 1))

else:

  print((bx - ax))
a, b, x = list(map(int, input().split()))

ans = b // x - a // x

if a % x == 0:

  ans += 1

print(ans)
from decimal import *

a, b, x = list(map(int, input().split()))
ax = int(Decimal(a) / Decimal(x))
bx = int(Decimal(b) / Decimal(x))
am = a % x
bm = b % x
if ax == bx and am != 0 and bm != 0:
    print((0))
elif am == 0:
    print((bx - ax + 1))
else:
    print((bx - ax))

a, b, x = list(map(int, input().split()))
ans = b // x - a // x
if a % x == 0:
    ans += 1
print(ans)

-from decimal import * - -ax = int(Decimal(a) / Decimal(x)) -bx = int(Decimal(b) / Decimal(x)) -am = a % x -bm = b % x -if ax == bx and am != 0 and bm != 0: -    print((0)) -elif am == 0: -    print((bx - ax + 1)) -else: -    print((bx - ax)) +ans = b // x - a // x +if a % x == 0: +    ans += 1 +print(ans)