You are given nonnegative integers a and b (a ≤ b), and a positive integer x.
Among the integers between a and b, inclusive, how many are divisible by x?

-----Constraints-----
 - 0 ≤ a ≤ b ≤ 10^{18}
 - 1 ≤ x ≤ 10^{18}

-----Input-----
The input is given from Standard Input in the following format:
a b x

-----Output-----
Print the number of the integers between a and b, inclusive, that are divisible by x.

-----Sample Input-----
4 8 2

-----Sample Output-----
3

There are three integers between 4 and 8, inclusive, that are divisible by 2: 4, 6 and 8.

Difficulty: EASY

Solutions:
(a, b, x) = map(int, input().split())
print(b // x - (a - 1) // x)


import math
(a, b, x) = map(int, input().split())
print(b // x - (a - 1) // x)


(a, b, x) = map(int, input().split())
m = (a - 1) // x + 1
n = b // x
print(n - m + 1)


(A, B, X) = map(int, input().split())
(mA, mB) = ((A - 1) // X, B // X)
print(mB - mA)


(a, b, c) = map(int, input().split())
if a == 0:
	print(b // c + 1)
	return
print(b // c - (a - 1) // c)


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


(A, B, X) = map(int, input().split())
print(B // X - (A - 1) // X)


(a, b, n) = list(map(int, input().split()))
print(b // n - ~-a // n)


(a, b, x) = map(int, input().split())
print(b // x - a // x + (a % x == 0))


(a, b, x) = map(int, input().split())
st = -(-a // x)
ed = b // x
print(ed - st + 1)


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


[a, b, x] = [int(i) for i in input().split()]
print(b // x - (a - 1) // x)


(a, b, x) = map(int, input().split())
s = b // x
t = (a - 1) // x
print(s - t)


(a, b, x) = map(int, input().split())
B = b // x
A = (a - 1) // x
print(B - A)


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


(a, b, x) = map(int, input().split())
c = (a - 1) // x
d = b // x
print(d - c)


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


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


def __starting_point():
	(a, b, x) = map(int, input().split())
	l = b // x
	r = (a - 1) // x
	print(l - r)
__starting_point()


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


(a, b, x) = map(int, input().split())
mx = b // x
mn = (a - 1) // x
print(mx - mn)


(a, b, n) = map(int, input().split())
print(b // n - (a - 1) // n)


(a, b, x) = map(int, input().split())
res1 = (a - 1) // x
res2 = b // x
ans = res2 - res1
print(ans)


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


(A, B, X) = [int(x) for x in input().split()]
print(B // X - (A - 1) // X)


(x, y, d) = map(int, input().split())
ans = y // d - (x - 1) // d
print(ans)


s = input().split()
a = int(s[0])
b = int(s[1])
c = int(s[2])
print(b // c - (a - 1) // c)


(a, b, x) = list(map(int, input().split()))
res = b // x - (a + x - 1) // x + 1
print(res)


(a, b, x) = tuple([int(x) for x in input().split(' ')])
if a % x == 0:
	print(b // x - a // x + 1)
else:
	print(b // x - a // x)


(a, b, x) = list(map(int, input().split()))
bb = b // x
aa = (a - 1) // x
print(bb - aa)


(a, b, x) = map(int, input().split())
t1 = (a - 1) // x
t2 = b // x
res = t2 - t1
print(res)


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


(a, b, x) = map(int, input().split())
aa = (a - 1) // x
ba = b // x
print(ba - aa)


(a, b, x) = map(int, input().split())
tmp1 = b // x
tmp2 = (a - 1) // x
print(tmp1 - tmp2)


(a, b, x) = map(int, input().split())
p = -(-a // x)
q = b // x
print(q - p + 1)


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


import re
import copy

def accept_input():
	(a, b, x) = list(map(int, input().split()))
	return (a, b, x)
(a, b, x) = accept_input()
print(b // x - (a - 1) // x)


(A, B, X) = map(int, input().split())
mn = -(-A // X)
mx = B // X
print(mx - mn + 1)


(a, b, x) = map(int, input().split())
cnt = 0
R = b // x
L = (a - 1) // x
print(R - L)


(a, b, x) = map(int, input().split())
u = b // x
l = (a - 1) // x + 1
print(u - l + 1)


(A, B, C) = list(map(int, input().split()))
print(B // C - (A - 1) // C)


def answer(a: int, b: int, x: int) -> int:
	return b // x - (a - 1) // x

def main():
	(a, b, x) = map(int, input().split())
	print(answer(a, b, x))

def __starting_point():
	main()
__starting_point()


(a, b, x) = map(int, input().split())
n1 = (a - 1) // x
n2 = b // x
print(n2 - n1)


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


(a, b, x) = map(int, input().split())
ad = (a - 1) // x
bd = b // x
print(bd - ad)


import sys
import math
import itertools
import collections
import heapq
import re
import numpy as np
from functools import reduce
rr = lambda : sys.stdin.readline().rstrip()
rs = lambda : sys.stdin.readline().split()
ri = lambda : int(sys.stdin.readline())
rm = lambda : list(map(int, sys.stdin.readline().split()))
rl = lambda : list(map(int, sys.stdin.readline().split()))
inf = float('inf')
mod = 10 ** 9 + 7
(a, b, x) = rm()
print(b // x - (a - 1) // x)


(a, b, x) = map(int, input().split())
max = b // x
min = (a + x - 1) // x
print(max - min + 1)


(A, B, X) = map(int, input().split())
Bd = B // X
Ad = (A - 1) // X
print(Bd - Ad)


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


import sys
input = sys.stdin.read
(a, b, x) = map(int, input().split())
print(b // x - a // x if a % x != 0 else b // x - a // x + 1)


(a, b, x) = (int(T) for T in input().split())
print(b // x - a // x + (a % x == 0))


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


import sys
input = sys.stdin.readline
enum = enumerate
inf = 1001001001
import collections
import random

def linput(ty=int, cvt=list):
	return cvt(list(map(ty, input().split())))

def vinput(rep=1, ty=int, cvt=list):
	return cvt((ty(input().rstrip()) for _ in '*' * rep))

def gcd(a: int, b: int):
	while b:
		(a, b) = (b, a % b)
	return a

def lcm(a: int, b: int):
	return a * b // gcd(a, b)

def dist(x1, y1, x2, y2):
	return abs(x1 - x2) + abs(y1 - y2)

def ran():
	vRan = [random.randint(1, 10), random.randint(0, 10), random.randint(1, 100)]
	return vRan

def bye(res):
	sT = 'No Yes'.split()
	print(sT[res])

def sol_n(a, b, c):
	res = 0
	cnt = 0
	while cnt < c:
		res += 1
		cnt += a
		if res % 7 == 0:
			cnt += b
	return res

def sol(a, b, c):
	res = 0
	L = -(-a // c)
	R = b // c
	res = R - L + 1
	return res

def deb():
	vI = ran()
	I = sol_n(*vI)
	J = sol(*vI)
	if 1:
		print((vI, I, J))

def main():
	vI = linput()
	print(sol(*vI))

def __starting_point():
	main()
__starting_point()


(a, b, x) = [int(_) for _ in input().split()]
print(b // x - (a - 1) // x)


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


(a, b, c) = (int(_) for _ in input().split())
print(b // c - (a - 1) // c)


(a, b, x) = map(int, input().split())
num1 = -(a // -x)
num2 = b // x
print(num2 - num1 + 1)


(a, b, x) = map(int, input().split())
B = b // x
preA = (a - 1) // x
print(B - preA)


(a, b, x) = [int(i) for i in input().split()]
print(b // x - a // x + (a % x == 0))


import sys
input = sys.stdin.readline
(a, b, x) = map(int, input().split())
a_count = (a - 1) // x
b_count = b // x
print(b_count - a_count)


import math
(a, b, c) = [int(i) for i in input().split()]
print(b // c - (a - 1) // c)


(a, b, x) = [int(i) for i in input().split()]
bx = b // x
ab = (a - 1) // x
print(bx - ab)


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


(a, b, x) = map(int, input().split())
nb = b // x
na_1 = (a - 1) // x
print(nb - na_1)


(a, b, x) = [int(n) for n in input().split()]
print(b // x - (a - 1) // x)


import math
(a, b, x) = map(int, input().split())
a_c = a // x if a % x == 0 else a // x + 1
b_f = b // x
print(b_f - a_c + 1)


(a, b, x) = map(int, input().split())
cb = b // x
ca = (a - 1) // x
c = cb - ca
print(c)


(a, b, x) = map(int, input().split())
bb = b // x
aa = a // x
print(bb - aa + (a % x == 0))


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


(a, b, x) = [int(w) for w in input().split()]
print(b // x - (a + x - 1) // x + 1)


(a, b, x) = map(int, input().split())
br = b // x
ar = (a - 1) // x
print(br - ar)


import math
from math import gcd, pi, sqrt
INF = float('inf')
import sys
sys.setrecursionlimit(10 ** 6)
import itertools
from collections import Counter, deque

def i_input():
	return int(input())

def i_map():
	return list(map(int, input().split()))

def i_list():
	return list(i_map())

def i_row(N):
	return [i_input() for _ in range(N)]

def i_row_list(N):
	return [i_list() for _ in range(N)]

def s_input():
	return input()

def s_map():
	return input().split()

def s_list():
	return list(s_map())

def s_row(N):
	return [s_input for _ in range(N)]

def s_row_str(N):
	return [s_list() for _ in range(N)]

def s_row_list(N):
	return [list(s_input()) for _ in range(N)]
import string

def main():
	(a, b, x) = i_map()
	print(b // x - (a - 1) // x)

def __starting_point():
	main()
__starting_point()


(a, b, x) = map(int, input().split())
ta = (a - 1) // x
tb = b // x
ans = tb - ta
print(ans)


import sys
import re
import queue
import collections
import math
from decimal import *
from copy import deepcopy
from collections import Counter, deque
from heapq import heapify, heappop, heappush
from itertools import accumulate, product, combinations, combinations_with_replacement
from bisect import bisect, bisect_left, bisect_right
from functools import reduce
from typing import Callable
from decimal import Decimal, getcontext

def i_input():
	return int(input())

def i_map():
	return map(int, input().split())

def i_list():
	return list(i_map())

def i_row(N):
	return [i_input() for _ in range(N)]

def i_row_list(N):
	return [i_list() for _ in range(N)]

def s_input():
	return input()

def s_map():
	return input().split()

def s_list():
	return list(s_map())

def s_row(N):
	return [s_input for _ in range(N)]

def s_row_str(N):
	return [s_list() for _ in range(N)]

def s_row_list(N):
	return [list(s_input()) for _ in range(N)]

def lcm(a, b):
	return a * b // gcd(a, b)
sys.setrecursionlimit(10 ** 8)
INF = float('inf')
MOD = 10 ** 9 + 7
num_list = []
str_list = []

def main():
	(a, b, x) = i_map()
	c = math.ceil(Decimal(a) / Decimal(x))
	d = math.floor(Decimal(b) / Decimal(x))
	print(d - c + 1)

def __starting_point():
	main()
__starting_point()


(a, b, x) = map(int, input().split())
a_div = 0
b_div = b // x
if a != 0:
	a_div = (a - 1) // x
	count = b_div - a_div
else:
	count = b_div - a_div + 1
print(count)