peterverebics/CodeNet_Python_118 huggingface dataset:
def input_int():
    return(int(input()))

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

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


def run():
    a, b, x = input_int_map()
    result = count_num(b, x) - count_num(a - 1, x)
    print(result)

def count_num(num, x):

    if num < 0:
        return 0

    return num // x + 1

run()

# 2 4 3

# 3 4 3

# 2 6 3
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())
ans = 0
if a%x==0:
    ans = (b-a)//x+1
else:
    c = (a//x+1)*x
    ans = (b-c)//x+1
print(ans)
a,b,x = map(int,input().split())
print(int(b//x)-int((a-1)//x))
import sys

sys.setrecursionlimit(10 ** 7)
rl = sys.stdin.readline


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


if __name__ == '__main__':
    solve()
a, b, x = map(int, input().split())

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

p = 0
y = int(b//x) + 1

i = 1
#for i in range(1,y):
while x*i <= b:
    if a <= x*i:
        p = x*i
        break
    i += 1

if p != 0:
    t = b-p
    s = t//x
    ans = s + 1
    if a == 0:
        ans += 1
    print(ans)
elif a == 0:
    print(1)
else:
    print(0)
import sys
input = sys.stdin.readline
a,b,x=map(int,input().split())
print(b//x-(a-1)//x)
A, B, X = map(int, input().split())

P, r = divmod(A, X)
if r:
    P += 1

Q, r = divmod(B, X)

#print(P, Q)
print(max(0, Q-P+1))
a,b,x = map(int,input().split())
print(b//x - (a-1)//x)
a, b, x = map(int, input().split())
a_div = (a - 1) // x + 1
b_div = b // x + 1

print(b_div - a_div)
a,b,x = map(int, input().split())


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

if a % x != 0 :
    aa = a//x+1
else :
    aa = a//x


bb = b //x

print(bb - aa  + 1 )
def resolve():
    '''
    code here
    '''
    a, b, x = [int(item) for item in input().split()]
    _a = a // x
    _b = b // x

    if a % x == 0:
        res = _b - _a + 1
    else:
        res = _b - _a
    
    print(res)



if __name__ == "__main__":
    resolve()
a,b,x = map(int,input().split())
cnt2 = b//x
cnt1 = (a-1)//x
print(cnt2-cnt1)
a, b, x = map(int, input().split(" "))

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

a_divmod = divmod(a, x)
if a_divmod[1] != 0:
    print(b//x - a_divmod[0])
else:
    print(b//x - a_divmod[0] + 1)
a,b,x = map(int,input().split())
ad = (a-1)//x
bd = b//x
print(bd-ad)
a,b,x=map(int,input().split())
shita=a//x
ue=b//x
if a%x==0:
  print(ue-shita+1)
else:
  print(ue-shita)
a,b,x = map(int, input().split())
if a%x == 0:
    buf1 = a//x - 1
else:
    buf1 = a//x

buf2 = b//x

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

ans = b//x - (a-1)//x 
print(ans)
a, b, x = map(int, input().split())
print(b // x + 1 if a == 0 else b // x - (a - 1) // x)
a, b, c = map(int, input().split())
print((b // c) - (a - 1) // c)
a,b,x=map(int,input().split())
a-=1
c=(a-a%x)//x
d=(b-b%x)//x
print(d-c)
def f(n):
    if x == -1:
        return 0
    else:
        return n//x+1

a,b,x = map(int,input().split())
print(f(b)-f(a-1))
a,b,x = map(int,input().split())

B = b//x
A = (a-1)//x

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

print(b // x - (a-1) // x)
a,b,x=map(int,input().split());print(b//x-(a-1)//x)
a,b,x = map(int,input().split())
print(b//x -(a-1)//x)
a, b, x = map(int, input().split())
ans = b//x - (a-1)//x
print(ans)
#!/usr/bin/env python3
# -*- coding: utf-8 -*-


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


if __name__ == "__main__":
    main()
a, b, x = [int(x) for x in input().split()]

cnt_a = (a-1) // x
cnt_b = b // x

print(cnt_b-cnt_a)
def generator(x, a): # xの倍数でaより大きいもののうちの最小値
    if x >= a:
        y = x
    else:
        tmp = a // x + 1
        if a % x == 0:
            tmp -= 1
        y = x * tmp

    return y


def main():
    a, b, x = map(int, input().split())
    minimum = generator(x, a)

    if minimum > b:
        count = 0
    else:
        count = (b - minimum) // x + 1

    if a == 0:
        count += 1

    print(count)


if __name__ == '__main__':
    main()
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)
a,b,x=map(int,input().split())
c=a-1
max=b//x+1
min=c//x+1
if c==-1:
    min=0
else:
    pass
print(max-min)
a,b,x=map(int,input().split())
if a==0:
    print(b//x+1)
else:
    print(b//x-(a-1)//x)
a, b, x = map(int, input().split())
if a % x == 0:
  b -= b % x
  print((b - a)//x + 1)
else:
  a -= a % x
  b -= b % x
  print((b - a)//x)
a,b,x=map(int,input().split())
b1=b//x
a1=(a-1)//x
print(b1-a1)
x, y, z = map(int,input().split())
if x%z != 0:
    print(y//z - x//z)
else:
    print(y//z - x//z +1)
a, b, x = map(int,input().split())
if a%x == 0:
    print(b//x-a//x+1)
else:
    print(b//x-a//x)
a, b, x = map(int, input().split())
m1 = a % x
m2 = b % x
if a == b:
  if a % x == 0:
    print(1)
  else:
    print(0)
  exit()
if m1 != 0:
  a = (a//x)*x + x
if m2 != 0:
  b = (b//x)*x

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

if __name__ == '__main__':
    solve()
a,b,x = map(int, input().split())
if a%x == 0:
    print(b//x-a//x+1)
else:
    print(b//x-a//x)
# import numpy as np
# import math
import sys
input = sys.stdin.readline


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

    res = b // x - (a - 1) // x

    print(res)



main()
def solve(a, b, x):
    def f(n):
        if n == -1:
            return 0
        return n // x + 1
    
    print(f(b) - f(a - 1))



T = list(map(int, input().split()))
solve(T[0], T[1], T[2])
a, b, x = map( int, input().split())
 
print( b//x - (a-1)//x)
# from decimal import Decimal
a, b, c = map(int, input().split())
print(b//c - a//c if a%c != 0 else b//c - a//c +1)
a, b, x = map(int, input().split())

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

up = b//x*x
if a%x == 0:
    down = a
else:
    down = (a//x+1)*x
ans = (up-down)//x+1
print(ans)
a, b, x = map(int, input().split())
fa = max(a - 1, 0) // x
fb = b // x
ans = fb - fa if a != 0 else fb - fa + 1
print(ans)
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())
if a%x!=0:
    temp = a%x
    a += x-temp
if a>b:
    print(0)
elif a==b:
    print(1)
else:
    temp = (b-a)//x
    print(temp+1)
a,b,x = map(int, input().split())

s = (a-1)//x
if a == 0: s = -1
p = b//x

print(p - s)
a, b, x = map(int, input().split())
aa = b//x
bb = a//x
if a%x != 0:
	print (aa-bb)
else:
	print (aa-bb+1)
a, b, x = list(map(int, input().split()))
print(b//x-(a-1)//x)
a, b, x = map(int, input().split())

# a = p*x + r, b = q*x + s
p = a // x
r = a % x
q = b // x
s = b % x

res = q - p

if r == 0:
  res += 1

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

if a%x==0:
    ax = a//x-1
else:
    ax = a//x

bx = b//x

print(bx-ax)
a,b,x = list(map(int,input().split()))
a1 = a//x if a%x else a//x-1
a2 = b//x
print(a2-a1)
n, k, x = map(int,input().split())
if n == 0:
  print(k//x + 1)
else:
  if n%x == 0:
    print(k//x - n//x + 1)
  else:
    print(k//x - n//x)
a, b, x = map(int, input().split())
def solve(a,b,x):
  ans =  b//x - (a-1)//x
  # print(ans)
  return ans
print(solve(a,b,x))
a, b, x = map(int, input().split())

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

def get_mod_num(limit,x):
    if limit==-1:
        return 0
    return limit//x+1

print(get_mod_num(b,x)-get_mod_num(a-1,x))
#k = int(input())
#s = input()
#a, b = map(int, input().split())
#s, t = map(str, input().split())
#l = list(map(int, input().split()))
#l = [list(map(int,input().split())) for i in range(n)]

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


def function(n,x):
    if (n>=0):
        return n//x+1
    else:
        return 0

ans = function(b,x) - function(a-1,x)

print(ans)
a,b,x=map(int,input().split())
cnt=0
#for i in range(a,b+1):
#  if i%x==0: cnt+=1
#print(cnt)

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

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

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

ans = b//x - (a-1)//x

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=map(int,input().split())
bb=b//x
aa=a//x
ans=bb-aa
if a%x==0:
    ans+=1
print(ans)
a,b,x = map(int,input().split())
def count(c):
  if c==0:
    return 0
  return c//x
print(count(b)-count(a-1))
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)
def main():
    a, b, x = map(int, input().split())
    if a == 0:
        left = 0
    else:
        left = (a-1)//x + 1

    if b == 0:
        right = 1
    else:
        right = b//x + 1 

    print(right - left)
if __name__ == "__main__":
    main()
a,b,x = list(map(int, input().split()))
print(b//x  - (a-1)//x)
a, b, x = map(int, input().split())

cnta = max((a - 1) // x + 1, 0)
cntb = b // x + 1

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

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

print(b // x - a // x + (1 if a % x == 0 else 0))
#abc064 b
a,b,x=map(int,input().split())
ans=b//x-(a-1)//x
print(ans)
a, b, x = [int(i) for i in input().split()]
print((b//x+1) - ((a-1)//x+1 if a >= 0 else 0))
a,b,x=map(int,input().split())
A=a//x
B=b//x
ans=B-A
if a%x==0:
    ans+=1
print(ans)
a,b,c=map(int,input().split())
n=a//c
m=b//c
o=0
if a%c==0:
    o=1
print(m-n+o)
a, b, x = map(int, input().split())
aa = (a-1) // x
bb = b // x
ans = bb-max(aa, 0)
if a == 0:
    ans += 1
print(ans)
a,b,x=map(int,input().split())
ans = 0
if a % x == 0:
  ans += 1
b //= x
a //= x
ans += b - a
print(ans)
a, b, x = map(int, input().split())

bans = b//x
aans = a//x

if a%x == 0:
    aans -= 1

print(bans - aans)
def cin():
	return map(int,input().split())

def cino(test=False):
    if not test:
        return int(input())
    else:
        return input()
def cina():
  return list(map(int,input().split()))

def ssplit():
    return list(input().split())


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

def f (n):
  if n == -1:
    return 0
  else:
    return n // x + 1

print(f(b) - f(a-1))
import sys
import math
import bisect

def query(n, x):
    return n // x + 1

def main():
    a, b, x = map(int, input().split())
    ans = query(b, x)
    if a > 0:
        ans -= query(a - 1, x)
    print(ans)

if __name__ == "__main__":
    main()
s = input().split()

a = int(s[0])
b = int(s[1])
x = int(s[2])

def bet_ween(p, q):
    if p < 0:
        return 0
    else:
        return (p // q) + 1


fa = bet_ween(a-1, x)
fb = bet_ween(b, x)
answer = fb - fa
print(int(answer))
import sys

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

cnt = 0
if a == 0:
    cnt = b // x + 1
else:
    cnt = b // x - (a - 1) // x

print("{}".format(cnt))
def main():
    A, B, X = map(int, input().split())
    ans = B // X - (A - 1) // X
    print(ans)


if __name__ == '__main__':
    main()
import sys
input = sys.stdin.readline

#n = int(input())
#l = list(map(int, input().split()))

'''
a=[]
b=[]
for i in range():
    A, B = map(int, input().split())
    a.append(A)
    b.append(B)'''

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

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

ans = (b // x) - (a // x)

if a % x == 0:
    ans +=1

print(ans)
a, b, x = map(int, input().split())
if a%x == 0:
    print(b//x-a//x+1)
else:
    print(b//x-a//x)
a,b,x=map(int,input().split())
print(max(b//x-(a-1)//x,0))
import sys
readline = sys.stdin.buffer.readline
sys.setrecursionlimit(10 ** 8)
INF = float('inf')
MOD = 10 ** 9 + 7

def main():
    a, b, x = map(int, readline().split())
    ans = b//x - (a-1)//x
    print(ans)

if __name__ == '__main__':
    main()
a, b, x = [int(i) for i in input().split()]

def ret(n):
    if n>=0:
        return n//x+1
    else:
        return 0
print(ret(b)-ret(a-1))
a,b,x=map(int,input().split())
temp1=(b//x)+1
if 0<=a-1:
  temp2=((a-1)//x)+1
else:
  temp2=0
print(temp1-temp2)
a,b,x = map(int, input().split())

ans = b//x - (a-1)//x

print(ans)
# from pprint import pprint
# import math
# import collections

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

_a = a // x + 1
_b = b // x + 1

if a % x == 0:
    _c = 1
else:
    _c = 0

ans = _b - _a + _c

# print(_a, _b, _c, ans)
print(ans)
a,b,x=list(map(int,input().split()))
print(b//x-(a-1)//x)
import sys
def input(): return sys.stdin.readline().strip()

def resolve():
    a,b,x=map(int, input().split())
    if a!=0:
        amade=(a-1)//x
        bmade=b//x
        print(bmade-amade)
    else:
        print(b//x+1)
resolve()
a, b, x = list(map(int, input().split()))
ans = (b // x) - (a // x)
if a % x == 0: ans += 1
print(ans)
a,b,x=map(int,input().split())
s=b//x
t=a//x
ans=s-t
if a%x==0:
    ans+=1
print(ans)
a,b,x = map(int,input().split())
d = b//x
if a%x == 0:
  e = a//x
else:
  e = a//x + 1
print(d-e+1)
a, b, x = map(int,input().split())
nb = b//x
na_1 = (a-1)//x
print(nb-na_1)
a, b, x = [int(i) for i in input().split()]
print(b//x - (a-1)//x)
a,b,x = map(int,input().split())
if a != 0:
    dum1 = ((a-1) // x) + 1
else:
    dum1 = 0
dum2 = (b//x)+1
print(dum2-dum1)
a, b, x = map(int, input().split()) 
print( b//x - (a-1)//x )
a,b,x=map(int,input().split())

if a%x==0:
  a-=x
elif b%x==0:
  b+=x
elif b%x<a%x:
  b+=x
count=(b-a)//x
if count<0:
  count=0
print(count)
a, b, x = map(int, input().split())
if x == 1:
    print(b - a + 1)
    exit()
if a == 0:
    print(b // x + 1)
    exit()
print(b // x - (a-1) // x)
a, b, k = map(int, input().split())
def n(x):
    return 0 if x == -1 else x // k + 1
print(n(b) - n(a-1))
import sys
input = sys.stdin.readline


def read():
    a, b, x = map(int, input().strip().split())
    return a, b, x

def solve(a, b, x):
    return b // x - (a-1) // x

if __name__ == '__main__':
    inputs = read()
    print(solve(*inputs))
#https://atcoder.jp/contests/abc048/tasks/abc048_b

#import math

a,b,x=map(int,input().split())
#max_num=math.floor(b/x)
#min_num=math.ceil(a/x)
#print(max_num-min_num+1)

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

def f(n, x=x):
    if n >= 0:
        return n//x + 1 
    else:
        return 0

cnt = int(f(b) - f(a-1))

print(cnt)
a,b,x=map(int,input().split())
if a>2:
  s=b//x
  t=(a-1)//x
  print(s-t)
elif a==1:
  print(b//x)
elif a==0:
  print(b//x+1)
import numpy as np
import functools
import math
import scipy
import fractions
import itertools

def solve():
    a, b, x = map(int, input().split())
    hoge = b // x
    huga = (a-1) // x
    print(hoge-huga)
    return 0

if __name__ == "__main__":
    solve()
a,b,x = map(int,input().split())
ans = b//x - max(0,(a-1))//x
if a == 0:
    ans += 1
print(ans)
a,b,x=map(int,input().split())

a_cnt=a//x
b_cnt=b//x

print(b_cnt-a_cnt+1 if a%x==0 else b_cnt-a_cnt)
a,b,x=map(int,input().split())

X=(b-b%x)
if a>X:
    print(0)
else:
    print(1+(X-a)//x)
a,b,x=map(int,input().split())
aa=(a-1)//x
bb=b//x
print(bb-aa)
a,b,x=map(int, input().split())
max=b//x
min=(a+x-1)//x
print(max-min+1)
import numpy as np
a,b,x = [int(i) for i in input().split()]

a_below = int((a-1)//x)

b_below = int(b//x)

ans= b_below-a_below

print(ans)
p=0;q=0;r=0
a,b,x=map(int,input().split())
p=int(b//x+1)
q=int((a-1)//x+1)
r=int(p-q)
print(int(r))
a, b, x = map(int, input().split())
print((b//x) + (-a//x) + 1)
a, b, x = [int(s) for s in input().split()]
q, m = divmod(a, x)
print(b // x - q + (1 if m == 0 else 0))
a,b,x=map(int,input().split())
newb=b//x
newa=a//x
amari=a%x
ans=newb-newa
if amari==0:
    ans+=1
print(ans)
#!/usr/bin/env python3
a, b, x = map(int, input().split())
print(b//x - (a-1)//x)
#!/usr/bin/env python3
import sys
def input():
    return sys.stdin.readline()[:-1]


def main():
    def f(n):
        return n // x + 1

    a, b, x = map(int, input().split())
    print(f(b) - f(a - 1))


if __name__ == '__main__':
    main()
a, b, x = map(int, input().split())
a += (x - a % x) if a % x != 0 else 0
answ = (b - a) // x if a % x != 0 else (b - a) // x + 1
print(answ)
a, b, x = map(int, input().split())

if a == 0:
    pa = 0
else:
    pa = (a - 1) // x + 1

if b == 0:
    pb = 1
else:
    pb = b // x + 1

print(pb - pa)


# 0 1 2 3 4 5
# ^
a,b,x = map(int,input().split())


ans = b//x - (a-1)//x
print(ans)
# https://atcoder.jp/contests/abc048/tasks/abc048_b
# B問題だけど緑パフォ

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

A = (a-1)//x
B = b//x

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

if a == 0:
    print(b // x + 1)
else:
    a -= 1
    print(b // x - a // x)
a, b, x = [int(i) for i in input().split()]
print((b//x+1) - ((a-1)//x+1 if a > 0 else 0))
import math
from decimal import Decimal
a,b,x=map(int,input().split())
print(math.floor(Decimal(b)/Decimal(x))-math.ceil(Decimal(a)/Decimal(x))+1)
a, b, x = tuple(map(int, input().split()))

if x == 0:
    print("0")
elif x == 1:
    print(len(range(a, b+1)))
else:
    cnt_b = b // x
    cnt_a = (a-1) // x
    print(cnt_b - cnt_a)
a,b,x = map(int, input().split())
work1 = b // x
work2 = (a - 1) // x
print(work1 - work2)
a,b,x = map(int, input().split())

s = b//x
t = (a-1)//x
print(s-t)
a, b, x = map(int, input().split())
def count(a, b, x):
  m = b // x + 1
  n = 0
  if a > 0:
    n = (a - 1) // x + 1
    
  return m - n
  
print(count(a, b, x))
a, b, x = map(int, input().split())
res = b // x - (a + x - 1) // x + 1
print(res)
A,B,C = map(int,input().split())
ans = 0
ans += B // C
ans -= (A-1) // C
print(ans)
def ans() : 
  a, b, x = tuple(map(int, input().split()))
  c1 = b // x
  c2 = (a - 1) // x
  print(c1 - c2)
  
  
ans()
a,b,x=map(int,input().split())
b_count=b//x
a_count=(a-1)//x
print(b_count-a_count)
x,y,d=map(int,input().split())
ans=y//d-(x-1)//d
print(ans)
a,b,x=map(int,input().split())

def f(n,x):
    return n//x+1

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

ans = 0
ans = (b//x+1) - ((a-1)//x+1)

print(ans)
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 if a!=0 else b//x+1)
a, b, x = map(int, input().split())
a -= 1  
cnt = b//x - a//x
print(cnt)
import sys
def input(): return sys.stdin.readline().strip()

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




if __name__ == "__main__":
    main()
a, b, x = map(int, input().split())
if a == 0:
    print(b//x + 1)
else:
    print(b//x - (a-1)//x)
a,b,x=map(int,input().split())
ans = b // x - (a-1)//x
print(ans)
a,b,x = map(int,input().split())
if a == 0:
    print(b//x + 1)
else:
    print((b//x) - ((a-1)//x))
a, b, x = map(int, input().split())
A = (a-1)//x
B = b//x
ans = B-A

print(ans)
def main():
    a, b, x = map(int, input().split())
    atmp = (a-1)//x
    btmp = b//x
    ans = btmp - atmp
    print(ans)

if __name__ == "__main__":
    main()
A, B, X = map(int, input().split())

ans=(B//X) - ((A-1)//X)

print(ans)
a, b, x = map(int, input().split())
# オーバーフロー
# cnt = len([_ for _ in range(a, b + 1, x)])
print(b // x - (a - 1) // x if a - 1 >= 0 else b // x - a // x + 1)
a,b,x = map(int,input().split())
a_num = 0
b_num = 0
if a == 0:
    b_num = (b//x)+1
else:
    a_num = ((a-1)//x)+1
    b_num = (b//x)+1
print(b_num-a_num)
a, b, c = map(int, input().split())
if a == 0:
  print(b // c+1)
  exit()
print(b // c - (a-1) // c)
from sys import stdin
def main():
    #入力
    readline=stdin.readline
    a,b,x=map(int,readline().split())

    if a==0:
        print(b//x+1)
    else:
        print(b//x-(a-1)//x)

if __name__=="__main__":
    main()
a, b, x = map(int, input().split())

print((b // x) - ((a - 1)// x))
a,b,x = 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 = map(int,input().split())
print(-a//x+ b//x+1)
a,b,x = map(int,input().split())
fisrt = 0
if a%x == 0:
    first  = a//x
else:
    first = a//x +1
    
last = b//x
print(last - first + 1)
a, b, x = map(int, input().split())
if a % x ==0:
    l = a//x 
else:
    l = a //x +1
r = b//x
ans = r - l +1
print(ans)
a, b, x = map(int, input().split())
print(b//x-(a-1)//x if a!=0 else b//x+1)
a,b,x=map(int,input().split())
a1=a//x
b1=b//x
print(b1-a1 if a%x!=0 else b1-a1+1)
a,b,x = map(int, input().split())
b = b // x+1
if a != 0:
    a = (a-1) // x+1

print(b - a)
A, B, X = map(int, input().split())
bx = B // X
ax = A // X

if A % X == 0:
    print(bx - ax + 1)
else:
    print(bx - ax)
def read_int():
    return int(input().strip())


def read_ints():
    return list(map(int, input().strip().split(' ')))


def solve():
    a, b, x = read_ints()
    return b//x-(a-1)//x


if __name__ == '__main__':
    print(solve())
def resolve():
    a, b, x = map(int, input().split())
    ans = calc(x, b) - calc(x, a-1)
    print(ans)

def calc(x, n):
    if n == -1:
        return 0
    else:
        return n//x + 1

if __name__ == '__main__':
    resolve()
# -*- coding: utf-8 -*-
# スペース区切りの整数の入力
a, b, x = map(int, input().split())
print(b // x - a // x + (1 if a % x == 0 else 0))
def main():
    a, b, x = map(int, input().split())

    ans = b // x - (a - 1) // x

    print(ans)


if __name__ == "__main__":
    main()
a,b,x = map(int, input().split())
print(b//x-(a-1)//x)
nums = [int(e) for e in input().split()]
def f(n, x):
    if n >=0:
        return int(n//x)+1
    elif n==-1:
        return 0

print(f(nums[1], nums[2])-f(nums[0]-1, nums[2]))
a, b, x = map(int, input().split())

low = (a-1) // x
up = b // x

print(up-low)
a, b, x = [int(x) for x in input().split()]


b_num = b // x
a_num = (a - 1) // x if a - 1 >= 0 else -1
print(b_num - a_num)
import sys

readline = sys.stdin.readline
MOD = 10 ** 9 + 7
INF = float('INF')
sys.setrecursionlimit(10 ** 5)


def main():
    a, b, x = map(int, readline().split())

    print(b // x - (a - 1) // x)


if __name__ == '__main__':
    main()
a, b, x = map(int, input().split())
b_mod = b//x+1
a_mod = (a-1)//x+1 if a > 0 else 0
ans = b_mod - a_mod
print(ans)
a,b,c=list(map(int,input().split()))
print(b//c-(a-1)//c)
a, b, x = [int(_) for _ in input().split()]

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

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