peterverebics/CodeNet_Python_118 huggingface dataset:
a,b,x = map(int, input().split())

c = b - a

d = c // x

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

print(ans)
a, b, x = map(int, input().split())
c1 = a // x
c2 = b // x
if a == b:
  if a % x == 0:
    print(1)
  else:
    print(0)
  exit()
print(c2-c1+1)
a,b,x = map(int,input().rstrip().split(" "))
if b - a + 1 >= x:
  if a % x != 0:
    a += x - (a % x)
    b -= (b % x)
  print((b - a) / x + 1)
else:
  if a + x - (a % x) > b:
    print(0)
  else:
    print(1)
a, b, x = map(int, input().split())

if (a - 1) < 0:
    count_a = 0
else:
    count_a = (a - 1) // 2 + 1

count_b = b // x + 1

print(count_b - count_a)
a,b,x=map(int,input().split())
ans=abs(b-a+1)/x
ans_a=a/x
ans_b=b/x
print(round(ans_b-ans_a))
a,b,x = map(int, input().split())
count = (b-a)//x
if a%x == 0 or a==0:
    count += 1

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

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

if a == 0:
    ans += 1

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

cnt_a = a // x
cnt_b = b // x

print(cnt_b-cnt_a)
import math

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

if b > a:
    N = int(b/x) - math.ceil(a/x) + 1

    print(int(N))
else:
    print(0)
a,b,x = map(int,input().split())

a += (x - a%x)
b -= b%x

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

ans = (b- a)// x

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

r=b-a
if a%x==0 or b%x==0:
    ans=(b-a)//x+1
elif b==a:
    ans=0
else:
    ans=(b-a)//x
print(ans)
a, b, x = map(int, input().split())
nums = [i if i%x == 0 else 0 for i in range(a, b+1)]
print(len(set(nums))-1)
a, b, x = map(int, input().split())

cnt = 0
for i in range(1, int(1e18)):
  if a <= x*i and x*i <= b:
    cnt += 1
  elif b <= x*i:
    break
    
print(cnt)
a,b,c=map(int,input().split())
mini = 0
m = a % c
if m == 0:
  mini = a/c
else:
  mini = (c-m + a)/c
maxi = 0
M = b % c
if M == 0:
  maxi = b/c
else:
  maxi = (b-m)/c
res = int(maxi) - int(mini) + 1
print(res)
a, b, x = map(int,input().split())

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

ans=0
if a!=b:
    A = (a-1)//x
    B = b//x

    ans = B - A
elif a==0 and b==0:
    ans=1

print(ans)
#!/usr/bin/env python
import math

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

if a%x == 0:
    if b%x == 0:
        if b//x - a//x != 0:
            ans = b//x - a//x + 1 
            print(ans)
            exit()
        else:
            ans = b//x - a//x
            print(ans)
            exit()
ans = b//x - a//x
print(ans)
import math
a,b,x=map(int, input().split())
print(math.floor(b/x)-math.ceil(a/x)+1)
a,b,x=map(int,input().split())
print(b//x-(a-1)//x if a>0 else b//x)
a,b,x=map(int,input().split())
if a%x>0 and b%x>0:
    print(b//x-a//x)
else:
    print(b//x-a//x+1)
a,b,x = map(int,input().split())
tmp = 0

if x>b:
    print(0)
elif x<a:
    if a%x==0 or b%x==0:
        tmp += 1
    print((b-a)//x+tmp)
else:
    if b-a>=x:
        if a%x==0 or b%x==0:
            tmp += 1
        print((b-a)//x+tmp)
    else:
        if a%x+b%x==x:
            tmp += 1
        print(tmp)
a, b, x = map(int, input().split())
ans = 0
A = a%x
B = (b-a)%x
if A<=B:
  ans += 1
ans += (b-a)//x
print(ans)
a,b,c=map(int,input().split())
mini = 0
maxi = 0
M = b % c
m = a % c
res = (b-M)/c+(m-a)/c
int(res)
print(res)
a, b, x = map(int, input().split())

i = a
j = b
while i % x != 0:
  i+= 1

while j % x != 0:
  j-= 1
  
ans = (j- i)/ x+ 1

if(ans<= 0):
  print(0)
else:
  print(int(ans))
import math


a, b, z = [int(w) for w in input().split()]

l = math.ceil(a/z)
r = b//z

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

print(b // x - a // x + (1 if (a % x == 0) or (b % x == 0) else 0))
a,b,x=map(int,input().split())
d=b-a
ans=d//x
if a%x==0 or b%x==0:
    ans+=1
if a==b:
    ans=0
print(ans)
i,j,n=map(int,input().split())
i_num=i/n
j_num=j/n
cnt=j_num-i_num
#print(cnt)
if i_num % n==0:
  cnt+=1
print(cnt)
import math
A, B, X = [int(s) for s in input().split()]

def main():
    a = math.ceil(A / X)
    b = math.floor(B / X)
    print(b - a + 1)

if __name__ == '__main__':
    main()
#48b
import math
a,b,x = map(int, input().split())

first = math.ceil(a/x)
end = b//x

if a!=0:
  print(end - first + 1)
else:
  print(end - first)
def resolve():
    a, b, x = map(int, input().split())
    count = culc(b, x) - culc(a, x)
    if a % 2 == 0 and b % 2 == 0:
        count += 1
    print(count)

def culc(num, x):
    if num == 0:
        return -1
    else:
        return num // x + 1

if __name__ == '__main__':
    resolve()
a, b, x = map(int, input().split())
if x == 1:
    print(b - a + 1)
    exit()
if a == b:
    if b % x == 0:
        print(1)
    else:
        print(0)
print(b // x - (a-1) // x)
a, b, x = map(int, input().split(" "))
a = 0 if a - 1 < 0 else a - 1
ans = b//x - a//x

print(ans)
import re
import sys
import math
import itertools
import bisect
from copy import copy
from collections import deque,Counter
from decimal import Decimal
import functools
def v(): return input()
def k(): return int(input())
def S(): return input().split()
def I(): return map(int,input().split())
def X(): return list(input())
def L(): return list(input().split())
def l(): return list(map(int,input().split()))
def lcm(a,b): return a*b//math.gcd(a,b)
sys.setrecursionlimit(10 ** 9)
mod = 10**9+7
cnt = 0
ans = 0
inf = float("inf")

a,b,x = I()
ca = a//x
cb = b//x
ans += cb-ca
if b % x == 0:
    ans += 1
print(ans)
a,b,x=map(int,input().split())
k=b-a+1
if a%x!=0 and a!=0:
  k2=x-(a%x)
elif a%x==0 and a!=0:
  k2=0
else:
  k2=x

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

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

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

from decimal import Decimal
 
a = Decimal(str(a))
b = Decimal(str(b))
x = Decimal(str(x)) 

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

if a > x or b < x:
    print("0")
elif a%x == 0:
    print(b//x-a//x+1)
else:
    print(b//x-a//x)
a,b,x=map(int,input().split())
b1=b//x
a1=a//x
print(b1-a1)
a,b,c=map(int,input().split())
s=0
 
for i in range(a,b):
  if i%c==0:
    s+=1
  
print(s)
# -*- coding : utf-8 -*-

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

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

p = 0

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

if p != 0:
    t = b-p
    s = t//x
    ans = s + 1
    print(ans)
else:
    print(0)
a, b, x = map(int, input().split())
a_mod = b//x+1
b_mod = (a-1)//x+1 if a > 0 else 0
ans = b_mod - a_mod
print(ans)
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)
else:
    print(0)
import numpy as np
import math
import sys
def sinput(): return sys.stdin.readline()
def iinput(): return int(sinput())
def imap(): return map(int, sinput().split())
def fmap(): return map(float, sinput().split())
def iarr(): return list(imap())
def farr(): return list(fmap())
def sarr(): return sinput().split()

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


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

if a == 0:
  print((b//x)-(a//x)+1)
else:
  print((b//x)-(a//x))
a,b,x = map(int,input().split())
ans = ((b-a)+1)//x
if a%x == 0:
    ans += 1
if a != b and b%x == 0:
    ans += 1
    if (b-a)%x == 0:
        ans -= 1
print(ans)
a,b,x=map(int,input().split())
ta=(a-1)//x
tb=b//x
ans=tb-ta+1
print(ans)
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()))

import math
def run():

    a, b, x = input_int_map()

    start = math.ceil(a / x) * x

    if start > b:
        print(0)
        return

    result = 1 + (b - start) // x

    print(result)


run()

# 2 4 3

# 3 4 3

# 2 6 3
a,b,x = [int(i) for i in input().split()]

N = int(b/x) - int(a/x) + 1

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

if a == 0 and b != 0 and b < x:
    print(0)
elif (a/x).is_integer():
    print(b//x-a//x+1)
else:
    print(b//x-a//x)
import math
a,b,x=map(int, input().split())
A=math.ceil(a/x)
B=math.floor(b/x)
if A>B:
  print(0)
else:
  print(B-A+1)
a, b, x = map(int, input().split())
if a%x ==0:
  print((b - a)//x + 1)
else:
  print((b - a + 1)//x)
#!/usr/bin/env python3
import collections
import itertools as it
import math
#import numpy as np
 
#  = input()
#  = int(input())
a, b, x  = map(int, input().split())
#  = list(map(int, input().split()))
#  = [int(input()) for i in range(N)]
#
# c = collections.Counter()

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

end = 0
begin = 0
if b%c == 0:
    end = b//c + 1
else:
    end = b//c

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

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

ans = b // x - a // x
print(ans)
a,b,x = [int(i) for i in input().split()]
d = b//x - a//x
a = a/x
if a.is_integer():
    d+=1
print(d)
from decimal import *
a, b, x = map(Decimal, input().split())
dif = b - a
ans = dif // x
if a % x == 0:
    ans += 1
elif b % x == 0:
    ans += 1
print(ans)
a, b, x = map(int, input().split())
result = 0

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

result += ((b - a) // x)

print(result)
a,b,c=map(int,input().split())
M = b % c
m = a % c
res = (b-M)/c+(m-a)/c
K=int(res)+1
print(K)
a,b,x = map(int, input().split())

ax = max(0,(a-1)//x)
bx = b//x

#print(ax)
#print(bx)

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

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

# a = p * x + r, b = q * x + s と剰余を使って表す
p = a // x
q = b // x

res = p - q
print(res)
import math
(a,b,x)=map(int, input().split(" "))
print(math.floor(b/x)-math.ceil(a/x)+1)
a, b, x = map(int, input().split())
count = 0
if a % x == 0:
    print((b-a)//x + 1)
else:
    print((b-a)//x)
a,b,x = map(int,input().split())
div,mod = divmod(b-a,x) #2,0
if a%x <= mod:
  print(div+1)
#elif a%x > mod:
#  print(div-1)
else:
  print(div)
a, b, x = map(int, input().strip().split())


def func(num1, num2, divide_num):
    ans = (num2 - num1) // divide_num
    if num1 % divide_num == 0:
        ans += 1

    print(ans)


func(num1=a, num2=b, divide_num=x)
a, b, x = map(int, input().split())

ans = (b - a) // x
if a % x == 0 and b % x == 0:
    ans += 1
print(ans)
a,b,x = map(int,input().split())
div,mod = divmod(b-a,x) #1,1
if mod == 0 and a%x == 0:#
  print(div+1)
elif a%x < mod:
  print(div-1)
else:
  print(div)
def resolve():
  a, b, x = map(int, input().split(" "))

  diff = b - a
  result = diff // x
  if b%x==0 or a%x==0:
    result += 1
  print(result)

if __name__ == "__main__":
  resolve()
(a,b,x) = map(int,input().split())
if a==0:
    print(int(b/x)+1)
else:
    print(int(b/x)-int((a-1)/x))
import math
import sys
import numpy as np
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
# ----------------------------------------
a, b, x = map(int, read().split())
'''
num = b - a + 1
arr = np.linspace(a, b, num)
div = np.where(arr % x == 0)
ans = div[0][0]
'''
if (a == 0):
    ans = b // x - a // x + 1
else:
    ans = b // x - a // x


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

n = b//x+1
if a>1:
  m = a//x
elif a==1:
  m=1
elif a==0:
  m=0
ans = n-m

print("{}".format(ans))
import math

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

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

if b >= 10**18:
    b -= x
ans = (b - a) // x + 1
if a == b:
    ans = 0

print(ans)
from sys import stdin
import math


if __name__ == "__main__":
    _in = [_.rstrip() for _ in stdin.readlines()]
    a,b,x = list(map(int,_in[0].split(' ')))  # type:list(int)
    # vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
    cnt = math.floor(b/x)-math.ceil(a/x)+1
    # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    print(cnt)
a, b, x = map(int, input().split())

i = a// x
j = b// x
p = i
q = j
while i* x < a:
  i+= 1
  p = i* x
while j* x < b:
  j+= 1
  q = (j- 1)* x

ans = int((q- p)// x)+ 1

if(ans<= 0):
  print(0)
else:
  print(ans)
a, b, x = map( int, input().split())

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

m=(b-a)//x

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

if a==b and a==0:
  print(1)
elif a>=b:
  print(0)
else:
  print(b//x-a//x+1)
a,b,x = map(int,input().split())
if a ==0:
    print(b//x+1)
else:
    print(b//x-a//x)
a,b,c=input().split()
a=int(a)
b=int(b)
c=int(c)
print(int(b/(1000000000*c)-a/(1000000000*c)*100000))
a,b,x=map(int,input().split())
p=b//x-a//x
if a//x==0:
  p+=1
print(p)
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits

def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
MOD = 10 ** 9 + 7

a, b, x = MAP()

print(b//x-(a-1)//2)
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()

    diff = (b - a) // x

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

    print(diff)


run()
a,b,x = (int(T) for T in input().split())
print((b//x)-(a//x))
# coding: utf-8

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

n = b - a

if a % x == 0 or b % x == 0:
    print(n // x + 1)
else:
    print(n // x)
a, b, x = map(int, input().split())
ans = 0
ans += (b-a) // x
if a % x == 0 and b % x == 0:
    ans += 1
print(ans)
from decimal import Decimal
a, b, c = map(Decimal, input().split())
print(a//c - b//c if a%c != 0 else a//c - b//c +1)
a, b, x = map(int, input().split())
count = 0

print((b-a)//x+1)
a,b,x=map(int,input().split())
print(b//x-max(a-1,0)//x)
a,b,x = map(int,input().split())
t = (b-a)//x
if a % x == 0 or b % x == 0:
	print (t + 1)
else:
	print (t)
a, b, x = list(map(int, input().split()))
s = a % x
d = b - a
ans = (d - s) // x + 1
print(ans)
a, b, x = map(int, input().split())
if x == 1:
    print(b - a + 1)
    exit()
if a == b:
    print(0)
    exit()
if a == 0:
    print(b // x + 1)
    exit()
print(b // x - (a-1) // x)
a,b,x=map(int,input().split())
print(b//x-a//x)
a, b, x = map(int, input().split())
if a%x == 0:
  print((b - a)//x + 1)
else:
  print((b - a)//x)
a, b, x = map(int, input().split())
print((b-a+1)//x)
a,b,x=map(int,input().split())
#a<=y<=bでy%x=0を満たすyの個数を求める
def between(a,b,x):
    if b<x and b!=0:
        print(0)
        return
    elif b<x and b==0:
        print(1)
        return
    elif a<=x:
        num=x
    elif x<a:
        num=a
        while num%x!=0:
            num+=1
    print((b-num)//x+1)

between(a,b,x)
def sol(x,m):
	if x<=0:
		return 0
	else:
		return x//m

a,b,n = map(int,input().split())
if a==b:
	print(0)
else:
	if a==0:
		print(sol(b,n)+1)
	elif a==1:
		print(sol(b,n))
	else:
		print(sol(b,n)-sol(a-1,n))
a,b,x = map(int,input().split())
count=0
if a%x==0 or a==0:
    print(int(b/x)-int(a/x)+1)
else:
    print(int(b/x)-int(a/x))
a,b,x = list(map(int, input().split()))

if a%x == 0:
    print(b//x-a//x+1)
elif b%x == 0:
    print(b//x-a//x+1)
else:
    print(b//x-a//x)
a,b,x=map(int,input().split())
cnt=0
c=a//x
d=b//x
print(int(d-c))
#!/usr/bin/env python

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

if a == b:
    print(0)
    exit()
if a%x == 0 and b%x == 0:
    ans = b//x - a//x + 1 
    print(ans)
    exit()
if a%x != 0 and b%x != 0:
    ans = b//x - a//x
    print(ans)
    exit()
ans = b//x - a//x + 1 
print(ans)
i,j,n=map(int,input().split())
i_num=i//n
j_num=j//n
cnt=j_num-i_num
#print(cnt)
if i_num % n==0:
  cnt+=1
print(cnt)
import math
import sys
import os
from operator import mul

sys.setrecursionlimit(10**7)

def _S(): return sys.stdin.readline().rstrip()
def I(): return int(_S())
def LS(): return list(_S().split())
def LI(): return list(map(int,LS()))

if os.getenv("LOCAL"):
    inputFile = basename_without_ext = os.path.splitext(os.path.basename(__file__))[0]+'.txt'
    sys.stdin = open(inputFile, "r")
INF = float("inf")

a,b,x = LI()

ans = 0
if a > 0:
    a -= 1
    ans += 1
ans += b//x - a//x

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

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

cnt = 0

print(b//x - a//x)
import math
a, b, x = map(int, input().split())
if (b // x) - (a // x)== 0:
        print(0)
else:
        print((((b - a)//x)  + 1))
# coding: utf-8

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

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

if a < c:
    r = 1
else:
    r = a % c == 0 or b % c == 0 if 1 else 0
ans = (b-a)//c + r

print(ans)
a,b,x=map(int,input().split())
keep=0
shita=a//x
ue=b//x
if a%2==1:
  print(ue-shita)
else:
  print(ue-shita+1)
a,b,c = list(map(int,input().split()))
x = a//c 
if a%c:
  x = a//c-1
y = b//c
print(y-x)
a, b, x = map(int, input().split())

if (a/x).is_integer() and (b/x).is_integer():
    print(b//x-a//x+1)
else:
    print(b//x-a//x)
# cook your dish here

li=list(map(int,input().split()))
if li[0]==li[1]:
    k=int(li[0]//li[2])
    if k*li[2]==li[0]:
        print(1)
    else:
        print(0)
elif li[0]<li[2]:
    if li[0]==0:
        print(li[1]//li[2]+1)
    else:
        print(li[1]//li[2])
else:
    print((li[1]//li[2])-(li[0]//li[2])+1)
a,b,x=map(int,input().split())
print(b//x-max((a-1)//x,0))
a,b,x = map(int, input().split())

from decimal import Decimal
 
a = Decimal(str(a))
b = Decimal(str(b))
x = Decimal(str(x)) 

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

print(a,b,x)

aw=a//x
bw=b//x
ans=bw-aw

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

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

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

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

p=a+(x-(a%x))
q=b-(b%x)
ans =1+(q-p)//x if p+q!=0 else 0
print(ans)
import math
a,b,x = map(int, input().split())
A=math.ceil(a/x)
B=b//x

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

if ans*(x+1)<=b:
    ans+=1

print(ans)
import math
(a,b,x)=map(float, input().split(" "))
print(math.floor(b/x)-math.ceil(a/x)+1)
a,b,x = map(int,input().split())
if a%x == 0:
    print(int((b-a)//x)+1)
else:
    print(int((b-a)//x))
import sys
readline = sys.stdin.buffer.readline

a,b,x = map(int,readline().split())
import math
low = math.ceil(a/x)
high = b//x

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

a += (x - a%x) if a%x else 0
b -= b%x

print(a,b)

ans = b//x - a//x + 1
print(ans)
a,b,x=map(int,input().split())
if a==0 :
  a=1
bb=b//x
aa=a-1
aa//=x
print (bb-aa)
import math
a, b, x = map(int,input().split())
if a % x != 0:
    print(b//x - a//x + 2)
else:
    print(b//x - a//x + 1)
import math
a,b,x=map(int, input().split())
A=math.ceil(a/x)
B=math.floor(b/x)
print(A-B+1)
a, b, x = map(int, input().split())

ans = 0

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

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

multiples = (b - a) // x

if a % x == 0 or b % x == 0:
    multiples += 1

if a == b == 0:
    print(0)
else:
    print(multiples)
a,b,x=map(int, input().split())

#a<=n<=b

if a%x==0:
  first=a//x
else:
  first=(a//x)*x+x
  
if first>b:
  print(0)
else:
  print((b-first)//x+1)
import math
a,b,x = map(int,input().split())

print(math.floor(b/x)-math.floor(a/x))
a,b,x=map(int,input().split())
print(int((b-a)/x))
a, b, x = map(int, input().split())
ans = 0
start = a
stop = b
c = 0
d = 0
for i in range(a, b):
  if i % x == 0:
    start = i
    c = start // x
    break
for i in range(b, a, -1):
  if i % x == 0:
    stop = i
    d = stop // x
    break
print(d - c + 1)
a, b, x = map(int, input().split())


print(b//x - a//x +1)
import math  # noqa
import bisect  # noqa
import queue  # noqa


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

    L = b - a + 1
    if L % x == 0:
        print(L // x)
    else:
        if a % x == 0 or b % x == 0:
            print(L // x + 1)
        else:
            print(L // x)
a, b, x = map(int, input().split())
print(b//x-a//x+1 if (b-a)!=0 else 0)
a,b,x=map(int,input().split())
cnt=0
while b-a<x:
	b-=x
	cnt+=1
print(cnt)
import math
import sys
import numpy as np
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
# ----------------------------------------
a, b, x = map(int, readline().split())
'''
num = b - a + 1
arr = np.linspace(a, b, num)
div = np.where(arr % x == 0)
ans = div[0][0]
'''
if (a == 0):
    ans = b // x - a // x + 1
else:
    ans = b // x - a // x


print(ans)
a, b, x = map(int, input().split(" "))
print((b - a + 1)//x)
a,b,x=map(int,input().split())
i,j=a//x,b//x
print(j-i+1)
data = [int(i) for i in input().split(" ")]
total = 0
if data[0] != data[1]:
  for i in range(data[0],data[1]+1):
    if i % data[2] == 0:
      total += 1
print(total)
a,b,c = map(int, input().split())

r = a % c == 0 or b % c == 0 if 1 else 0
ans = b//c-a//c + r

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

if  (a!= 0 and a % x == 0) or (b!= 0 and b % x == 0) ==0:
    print((b-a)//x + 1)
else:
    print((b-a)//x)
import math
a, b, x = map(int,input().split())
print(b//x - math.ceil(a/x) + 1)
a,b,k=map(int,input().split())
x=a//k
y=b//k
res=y-x
if a%k==0 and b%k==0:
    res+=1
print(res)
a, b, x = map(int, input().split())
div_a = a // x
div_b = b // x
if a == 0:
    div_b += 1
print(div_b - div_a)
a, b, x = map(int,input().split())

r = 0
#b = max(a, (b // x) * x)
b_a = b - a
r = b_a // x
if a % x == 0:
  r += 1

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

aa = (a-1) // 3 + 1

bb = b // 3

print(bb - aa + 1)