peterverebics/CodeNet_Python_118 huggingface dataset:
a, b, x = map(int, input().split(" "))
ans = (b - a )//x + 1
if a % x != 0 and b % x != 0 and (b - a) % x == 0:
  ans -= 1
print(ans)
a,b,x = map(int,input().split())
if a % x == 0 or b % x == 0:
    print((b - a) // x + 1)
else:
    print((b - a) // x)
a,b,x=map(int,input().split())
#TLE#########################
# ans=0
# for i in range(a,b+1):
#   if i%x==0:
#     ans+=1
# print(ans)
################################
print(b/x - (a-1)//x)
from sys import stdin


def ceil(a,b):
    return (a+b+1)//b


def floor(a,b):
    return a//b


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


numbers = sys.stdin.readline().split(' ')

a = int(numbers[0])
b = int(numbers[1])
c = int(numbers[2])


if a > 0:
    print(int(b//c - (a-1)//c))
else:
    print(int(b//c))
a, b, x = map(int, input().split())
d=(b-a)//x
if a%x==0:
    d=d+1
    print(d)
else:
    print(d)
import sys
a,b,x=map(int,input().split())
count = 0
ans = 0
for i in range(a,b+1):
    if i%x==0:
        count += 1
        ans = i
        break
while True:
    if ans == 0:
        break
    elif ans < b:
        ans += x
        count += 1
    else:
        break

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

if a%x==0:
  print((b-a)//x+1)
else:
  print((b-a)//x)
import math
a,b,x = map(int,input().split())
c = 0
print(sum([1 for i in range(4,8+1) if i % x == 0]))
a,b,x=map(int,input().split())

p=a+(x-(a%x))
q=b-(b%x)
ans =1+(q-p)//x 
print(ans)
x = list(map(int,input().split()))
a = 0
b = x[1]+1
for i in range(min(x[1],max(x[0],x[2])),x[1]):
    if i % x[2] ==0:
        a = 1
        b=i        
        break
c = ((x[1]-b)//x[2]) + 1
print(c)
import decimal
decimal.getcontext().prec=50
a,b,x=map(int,input().split())
a=decimal.Decimal(a)
b=decimal.Decimal(b)
print(int(b/x)-int((a+x-1)/x))
a,b,x = map(int,input().split())
if a%x == 0 or b%x == 0:
    print(int((b-a)//x)+1)
else:
    print(int((b-a)//x))
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())

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

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

if b%x == 0:
    print(b//x-a//x+1)
else:
    print(b//x-a//x)
x = list(map(int,input().split()))
a = 0
if x[0]%x[2]==0:
    b = x[2]
else:
     b = ((x[0] // x[2])+1)*x[2]
c = (x[1]-b)//x[2] + 1
if x[0]==0:
    c+=1
print(c)
a,b,x = map(int, input().split())
print((b-a)//x+1 if a%x==0 else (b-a)//x)
a, b, x = map(int, input().split())

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

    if diff == 0:

        if x > a and x < b:
            print(1)
            return

    print(diff)


run()

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

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

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

print((b - a) // x)
# AtCoder Beginner Contest 048 - B
# -*- encoding: UTF-8 -*-

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

x_min = 0
if a % x == 0 :
  x_min = a / x
else :
  x_min = a // x + 1

x_max = 0
if b % x == 0 :
  x_max = b / x
else:
  x_max = b // x

result = 0

x_num = int(x_max - x_min + 1)

print(x_num)
INT = lambda: int(input())
INTM = lambda: map(int,input().split())
STRM = lambda: map(str,input().split())
STR = lambda: str(input())
LIST = lambda: list(map(int,input().split()))
LISTS = lambda: list(map(str,input().split()))
def do():
    a,b,x=INTM()
    if a>=1:
        cta=a//x
    else:
        cta=0
    ctb=b//x
    print(ctb-cta)
if __name__ == '__main__':
    do()
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 = (b - start) // x

    print(result)


run()

# 2 4 3

# 3 4 3

# 2 6 3
a,b,x = map(int, input().split())
print((b-a+1)//x + 1 if a%x==0 and b%x==0 else (b-a+1)//x)
a, b, x = map(int, input().split()) 

ans = 0

for i in range(b):
  if i % x == 0:
    ans += 1
    
for j in range(a):
  if j % x == 0:
    ans -= 1
    
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())

if a%2==0:
    print(b//x-a//x+1)
else:
    print(b//x-a//x)
a, b, x = map(int, input().split(" "))
ans = (b - a )//x
if a % x == 0:
  ans += 1
if b % x == 0:
  ans += 1
print(ans)
import numpy as np
a, b, x = map(int, input().split())
upper = np.floor(b / x)
lower = np.ceil(a/x)

ans = int(upper - lower + 1)

print(ans)
a, b, x = map(int, input().split(" "))
print((b-a)//x)
# https://atcoder.jp/contests/abc048/tasks/abc048_b

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


a_x = a // x 
b_x = b // x

ans = abs(a_x - b_x)

mi = b
if a < b:
    mi = a

    if mi % x == 0 and mi != 0:
        ans += 1

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

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

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

print(b // x - a // x)
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(b//x)
else:
    print(b//x - (a-1)//x)
a, b, x = map(int, input().split())

if a == 0:
  print(b//x)
else:
  print(b//x - (a-1)//x)
a,b,c=input().split()
a=int(a)
b=int(b)
c=int(c)
count=0
for i in range(a,b):
  if i%c==0:
    count=count+1
print(count)
a,b,x=map(int, input().split())
print(b//x-a//x)
a,b,x=map(int,input().split())
import math
ta=math.ceil(a/x)
tb=b//x
if a==0:
  ans=tb-ta
else:
  ans=tb-ta+1
print(ans)
a,b,x=map(int,input().split())
if a>=x:
  for i in range(a,b+1):
     if i%x==0:
        y=(b-i)//x
        print(y+1)
        exit()
elif x<=b:
  for i in range(x,b+1):
    if i%x==0:
      y=(b-i)//x
      print(y+1)
      exit()
else:
  print(0)
  exit()
  

print(0)
# coding: utf-8

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

n = b - a
print(n // x + 1)
# -*- coding: utf-8 -*-
"""
Created on Sat May 30 16:32:18 2020

@author: NEC-PCuser
"""

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

a_shou = a / x
b_shou = b / x

ans = b_shou - a_shou

if (a % x == 0 or b % x == 0):
    ans += 1

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

while True:
    a += x
    if a<=b:
        cnt += 1
    else:
        break
print(cnt)
a, b, x = map(int, input().split())
diff = b-a
ans = diff // x
ans += int((a%x==0) or (b%x==0))
print(ans)
a, b, x = map(int, input().split())
diff = b-a
ans = diff // x
if a == 0:
    ans += 1

print(ans+1)
a, b, x = map(int, input().split())
print(b//x-a//x+1 if (b%x)+(a%x)==0 else b//x-a//x)
a, b, c = map(int, input().split())
cnt = 0
for i in range(a,b):
    if i % c == 0:
        cnt = i
        break
    else:
        continue
print(1 + (b - cnt) // c)
a, b, x = map(int, input().split())

max = b // x
if a == 0:
  before = 0
else:
  before = (a - 1) // x

print(max - before)
a, b, x = map(int,input().split())
a2 = -(-a // x) * x
b2 = -(-b // x) * x
print((b2 - a2) // x + 1)
import sys


def input(): return sys.stdin.readline().strip()
def I(): return int(input())
def LI(): return list(map(int, input().split()))


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

start = a if a % x == 0 else a // x + x
ans = max(0, b - start) // x + 1

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

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

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

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

ini = math.ceil(a / x)
end = b // x
print(end - ini + 1)
A,B,C = list(map(int,input().split()))
print((B-A+1)//C)
a,b,x=map(int,input().split())
count=0

count+=(b-a)//x
if a==b and a%x==0:
  count+=1
elif a%x==0:
  count+=1
elif b%x==0:
  count+=1

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

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

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

print("{}".format(ans))
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 (b < x):
    ans = 0
else:
    bx = b // x
    ax = a // x
    ans = bx - ax
    if (a % x == 0):
        ans += 1


print(ans)
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

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

print(b//x-(a//x))
#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)
import sys


def input(): return sys.stdin.readline().strip()
def I(): return int(input())
def LI(): return list(map(int, input().split()))


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

def calc(n):
    if n <= -1 :
        cnt = 0
    else:
        cnt = int( n / x ) + 1
    return int(cnt)
    
cnt_a = calc(a-1)
cnt_b = calc(b)

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

r = 0
b_a = b - a +1
r = b_a // x
r += 1

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

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 and a<=x<=b:
        tmp += 1
    print(tmp)
# coding: utf-8

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

if (a % x) != 0:
    start_v = a + x - (a % x)
else:
    start_v = a

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

if a%x==0:
  a-=x
elif b%x==0:
  b+=x
count=(b-a)//x
if count<0:
  count=0
print(count)
x = list(map(int,input().split()))
a = 0
b = x[1]+1
for i in range(min(x[1],max(x[2],x[0])),x[1]+1):
    if i % x[2] ==0:
        a = 1
        b=i        
        break
c = (x[1]-b)//x[2] + 1
print(c)
a,b,k=map(int,input().split())
x=a//k
y=b//k
res=y-x
if a%k==0 and b%k==0 and x<y:
    res+=1
print(res)
a, b, x = map(int, input().split())

if a == 0 and b == 0:
    print(1)
elif a % x == 0 and x != 1:
    print((b - a + 1) // x + 1)
else:
    print((b - a + 1) // x)
def f(n, x):
    ans = 0
    if (0 <= n):
        ans = n // x
    return ans


if __name__ == "__main__":
    a, b, x = map(int, input().split())
    print(f(b, x) - f(a - 1, x))
a,b,x = map(int,input().split())
ans = (b-a+1)//x
if a%x == 0 and b%x == 0:
	ans = ans + 1
if x == 1:
  ans = ans - 1
print(ans)
import math
a,b,x = map(int, input().split())
A = math.ceil (a/x)
B = math.floor (b/x)
print (B-A+1)
a,b,x = map(int, input().split())

count=0
if a<=x :
    ai = x
else:
    ai = (a//x)*x
    if ai<a :
        ai +=x
if ai<=b :
    count+=1
    count+=(b-ai)//x

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

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

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

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

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


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

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

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

if b == 0:
  print(0)

s = math.floor(b / x)

if a == 0:
  print(s + 1)
else:
  k = math.floor((a - 1) / x)
  print(s - k)
a, b, x = map(int, input().split())
flg = False
for i in range(a, b + 1):
    if i % x == 0:
        flg = True
        res = b // x - a // x + 1
        break
if flg:
    print(res)
else:
    print(0)
a,b,x = map(int,input().split())

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

ans = (b-a)//x
if a%x == 0:
    ans += 1
elif b%x == 0:
    ans += 1
print(ans)
a,b,x=map(int,input().split())
ans=0
if a==0:
  ans+=1
if a==b:
  print(0)
  exit()
if x>b:
  print(ans)
elif a<=x<=b:
  ans+=(b//x)
  print(ans)
else:
  for i in range(a,b+1):
    if i%x==0:
      ans+=(b-i)//x
      print(ans+1)
      break
a,b,c = map(int,input().split())

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

count = b//x - a//x

if a%x == 0 and a != 0:
    count += 1

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

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

#print(ax)
#print(bx)

print(bx-ax+1)
x,y,z=list(map(int, input().split()))
ans=0

if (y-x)//z==0:
	if x%z > y%z:
		ans=ans+1
	if x%z==0 or y%z==0:
		print(1)
	else:
		print(ans)
else:
	if x%z==0 or y%z==0:
		print(((y-x)//z)+1)
	else:
		print((y-x)//z)
a,b,x = map(int,input().split())
if a == 0:
  ans = b//x + 1
else:
  ans = (b-a+1)//x
  if a%x == 0 and b%x == 0:
    ans = ans + 1
  if x == 1:
    ans = ans - 1
print(ans)
a,b,x = map(int,input().split())
A = a//x
B = b//x
if a == 0:
  print(B-A+1)
elif b%x == 0:
  print(B-A+1)
else:
  print(B-A)
a,b,x = map(int, input().split())
if a%x==0:
    A=a//x
else:
    A=a//x+1
B=b//x
 
print(0 if B-A==0  else B-A+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)
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(int(cnt))
a, b, x = map(int, input().split())

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

count+=(b-a+1)//x
if a==b and a%x==0:
  count+=1
elif a%x==0:
  count+=1
elif b%x==0:
  count+=1

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

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

print(end-start+1)
# coding: utf-8

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


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

print(f(b) - f(a))
a,b,c=map(int,input().split())
print((a-1)//c+b//c)
a,s,d=map(int,input().split())
l=-(-a)//d
u=s//d
print(u-l+1)
a,b,x = map(int,input().split())
alpha = 0
beta = 0
if a-1 == -1:
  alpha = 0
else:
  alpha = (a//x)+1
beta = (b//x)+1
print(beta-alpha)
a, b, x = map(int, input().split())
ans = (b-a)//x
if a % x == 0:
    ans += 1
print(ans)
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)
	else:
		print(sol(b,n)-sol(a-1,n))
a,b,x=map(int,input().split())
p=0
q=0
for i in range(a,b+1):
  if i % x==0:
    p=i
    break
for j in range(b,a,-1):
  if i % x==0:
    q=j
    break
print(1+(q-p)//x)
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: 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()
a = math.floor(a//x * x)
b = math.floor(b//x * x)
print(b//x - a//x + 1)
a,b,x=map(int,input().split())
if a==0:
    #0以上b以下でbで割り切れる個数
    if b%x==0:
        ans_b = b//x +1
    else:
        ans_b = b//x
    #0以上a未満でbで割り切れる個数
    if a%x==0:
        ans_a = a//x
    else:
        ans_a = a//x + 1
else:
    ans_b = b//x
    if a%x==0:
        ans_a = a//x -1
    else:
        ans_a = a//x

print(ans_b-ans_a)
a, b, x = map(int, input().split())

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

if a == b and a % x != 0:
  result = 0
  print(result)
  exit()
elif a == b and a % x == 0:
  result = 1
  print(result)
  exit()
else:
  B = divmod(b, x)
  A = divmod(a, x)
  result = B[0] - A[0]
  if a == 0 or (A[1] == 0 and B[1] == 0): result += 1
  print(result)
a, b, x = map(int, input().split(' '))

multiples = (b - a) // x

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

print(multiples)
from decimal import * 
a, b, x = map(str, input().split())
a = Decimal(a)
b = Decimal(b)
x = Decimal(x)

ans = (b - a) / x

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

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

count = (b-a)//x

if(a%x == 0 or b%x == 0):
    count += 1

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

if __name__ == "__main__":
    main()
x = list(map(int,input().split()))
a = 0
if x[0]%x[2]==0:
    b = x[0]
else:
     b = ((x[0] // x[2])+1)*x[2]
c = (x[1]-b)//x[2] + 1
if x[0]==0:
    c+=1
print(c)
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(int(cnt))
x,y,z=list(map(int, input().split()))
ans=0

if (y-x)//z==0:
	if x%z > y%z:
		ans=ans+1
	if x%z==0 or y%z==0:
		print(1)
	else:
		print(ans)
else:
	ans=((y//z)-(x//z))
	if x==0:
		ans=ans+1
	print(ans)
import math

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

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

    print(res)
    
main()
a, b, x = map(int, input().split(' '))
print((b-a-(a%x))//x+1)
a, b, x = map(int, input().split())
d=(b-a)//x
if a%x==0 or b%x==0:
    d=d+1
    print(d)
else:
    print(d)
import math
a,b,x = map(int,input().split())

print(b//x-math.ceil(a/x)+1)
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(b//x)
else:
    print(b//x - (a-1)//x)
a, b, x = list(map(int, input().split()))
s = a % x
d = b - a
ans = (d - s) // x + 1
if b < x:
    ans = 0
print(ans)
a, b, x = map(int, input().split())
ans = 0
ans += -(-(b-a) // x)
#print(ans)
#print((b-a)/x)
if (b-a) % x == 0 and a % x == 0 and b % x == 0:
    ans += 1
print(ans)
a,b,x=map(int,input().split())
aw=a//x
bw=b//x
ans=bw-aw

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

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

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

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

print(ans)
import decimal
a,b,x=map(int,input().split())
a=decimal.Decimal(a)
b=decimal.Decimal(b)
print(int(b/x)-int((a-1)/x))
x,y,d=map(int,input().split())
ans=y//d-x//d
if x==0:
  ans+=1
print(ans)
# -*- coding: utf-8 -*-
"""
Created on Sat May 30 16:32:18 2020

@author: NEC-PCuser
"""

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

a_amari = a % x
b_amari = b % x

ans = (b - a) / x

if ((a_amari + b_amari % x) == 0):
    ans += 1

print(int(ans))
a,b,c =map(int,input().split())
if a ==5 and b ==5 and c ==7:
  print('YES')
elif a ==5 and b ==7 and c ==5:
  print('YES')
elif a ==7 and b ==5 and c ==5:
  print('YES')
else:
  print('NO')
nums = list(map(int, input().split()))
nums.sort()
if nums == [5, 5, 7]:
    print("YES")
else:
    print("NO")
import sys
import math
import itertools
import bisect
from copy import copy
from collections import deque,Counter
from decimal import Decimal
def s(): return input()
def i(): return int(input())
def S(): return input().split()
def I(): return map(int,input().split())
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

A = l()
A.sort()
if A == [5,5,7]:
    print('YES')
else:
    print('NO')
a=input().split()
if a.count('5')==2 and a.count('7')==1:
    print('YES')
else:
    print('NO')
fifcount = 0
sevcount = 0
s  = list(map(int, input().split()))

for i in range(3):
  if s[i] == 5:
    fifcount += 1
  elif s[i] == 7:
    sevcount += 1
if fifcount ==2 and sevcount ==1:

  print("YES")
else:
  print("NO")
A,B,C=map(int,input().split())

if A==5:
  if B==5:
    if C==7:
      print("YES")
    else:
      print("NO")
  elif B==7:
    if C==5:
      print("YES")
    else:
      print("NO")
  else:
    print("NO")
elif A==7:
  if B==5 and C==5:
    print("YES")
  else:
    print("NO")
else:
  print("NO")
a,b,c=map(int,input().split())
a,b,c=sorted([a,b,c])
if (a,b,c)==(5,5,7):print('YES')
else:print('NO')
import sys
input = sys.stdin.readline

a, b, c = map(int, input().split())
match = [a, b, c]
cnt = 0

for i in range(3):
    if match[i] == 5:
        cnt += 2
    elif match[i] == 7:
        cnt += 1

if cnt == 5:
    ans = 'YES'
else:
    ans = 'NO'

print(ans)
i = list(map(int, input().split()))
li = [i[0], i[1], i[2]]
yn = "NO"
if li.count(5) == 2:
  if li.count(7) == 1:
    yn = "YES"
    
print(yn)
inp = (input().split())

if inp.count('5') == 2 and inp.count('7') == 1:
    print("YES")
else:
    print("NO")
a,b,c=map(int,input().split())
if a==7 and b==5 and c==5:
    print("YES")
elif b==7 and a==5 and c==5:
    print("YES")
elif c==7 and a==5 and b==5:
    print("YES")
else:
  print("NO")
x=list(map(int,input().split()))
if x.count(5)==2 and x.count(7)==1:
  print("YES")
else:
  print("NO")
cand=[(5,5,7),(5,7,5),(7,5,5)]
X=tuple(map(int,input().split()))
print("YES") if X in cand else print("NO")
A = sorted(list(map(int,input().split())))

if A == [5,5,7]:
    print("YES")
else:
    print("NO")