peterverebics/CodeNet_Python_118 huggingface dataset:
a,b,x = map(int, input().split())
a += a % x
b -= b % x
print(1 + (b - a) // 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, readline().split())
'''
num = b - a + 1
arr = np.linspace(a, b, num)
div = np.where(arr % x == 0)
ans = div[0][0]
'''
if (b == 0):
    ans = 0
elif (a == 0) and (b != 0):
    ans = b // x

else:
    ans = (b // x) - (a // x)
    if (a % x == 0):
        ans += 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()))

def run():

    a, b, x = input_int_map()

    start = a // x
    end = b // x
    diff = end - start

    if diff == 0:
        print(0)
        return

    print(diff + 1)

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

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

fb=b//x+1

if a==0:
  fa=0
else:
  fa=a//x+1
print(fb-fa)
a, b, x = map(int, input().split())
def count(a, b, x):
  temp = b / x
  if a == 0:
    return b
  else:
    return b - ((a-1) / x)
  
print(count(a, b, x))
def solve(a, b, x):
    a = max(a, x) if a != 0 else a
    if a % x != 0:
        a += a % x
    if b % x != 0:
        b -= b % x
    if a > b:
        print(0)
    else:
        print((b - a - 1) // x + 2)



T = list(map(int, input().split()))
solve(T[0], T[1], T[2])
A, B, x = map(int,input().split())
b_d = B//x+1
a_d = A//x
if A!=0:
   a_d+=1
print(b_d - a_d)
a, b, x = map(int, input().split())
if (1 <= b // x - a // x) or (a==b and a % x == 0):
    res = b // x - a // x + 1
    print(res)
else:
    print(0)
import sys
read = sys.stdin.read
readlines = sys.stdin.readlines
def main():
    a, b, x = map(int, input().split())

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

    print(r)

if __name__ == '__main__':
    main()
(a,b,x)=map(float, input().split(" "))
print(int((b//x)-((a-1)//x)))
a,b,x=map(int,input().split());b=(b-a)+1
print([b//x+1,b//x][x%2!=0] if b>x else 0)
a,b,x=map(int,input().split());b=(b-a)+1
print(b//x-(a-1)//x)
def resolve():
    a, b, x = map(int, input().split())
    c = b - a
    ans = c // x
    if a % x == 0 or b % x == 0:
        ans += 1

    print(ans)

resolve()
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
    if (a == 0):
        ans = bx
    else:
        ax = a // x
        ans = bx - ax
        if (a % x == 0):
            ans += 1


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

aa = a + a % x

ans = (b - aa) // x + 1

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

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

if b > 0:
  bb = int(b/x)+1
else:
  bb = 0
  
if a > 0:
  a = a - 1
  aa = int(a/x)+1
else:
  aa = 0
print(bb-aa)
a, b, x = map(int, input().split())
ans = 0
ans += -(-(b-a) // x)
#print(ans)
#print((b-a)/x)
if a % x == 0 and b % x == 0:
    ans += 1
print(ans)
a,b,x = [int(i) for i in input().split()]
if (b-a) % x == 0:
    print((b-a) // x)
else:
    print((b-a) // x + 1)
a,b,x = map(int,input().split())
if a%x == 0:
    if b%x == 0:
        print(int((b-a)//x)+2)
    else:
        print(int((b-a)//x)+1)
elif b%x == 0:
    if a%x == 0:
        print(int((b-a)//x)+2)
    else:
        print(int((b-a)//x)+1)
else:
    print(int((b-a)//x))
a,b,x = map(int, input().split())

cnt=0
for num in range(a, b, 1):
    if num % x == 0:
        cnt+=1
print(cnt)
a, b, x = map(int, input().split())
print(len(range(a + (0 if a % x else -1), b, x)))
a, b, x = map(int, input().split())

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

print(ans)
A, B, X = map(int, input().split())

ans = 0
temp_A = 0
temp_B = 0
for i in range(B, 0, -1):
    if i % X == 0:
        temp_B = i
        break

for i in range(A-1, 0, -1):
    if i % X == 0:
        temp_A = i
        break

if temp_A != 0:
    ans_a = temp_A / X
else:
    ans_a = 0

if temp_B != 0:
    ans_b = temp_B / X
else:
    ans_b = 0

ans = ans_b - ans_a

if X == 1:
    ans = B+1

print('{:.18g}'.format(ans))
a, b, x = map(int, input().split())
print((b//x)-(a//x))
a,b,x = map(int,input().split())
if a%x == 0:
    if b%x == 0:
        print(int((b-a)//x)+1)
    else:
        print(int((b-a)//x))
elif b%x == 0:
    if a%x == 0:
        print(int((b-a)//x)+1)
    else:
        print(int((b-a)//x))
else:
    print(int((b-a)//x))
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
if(x[0]==0):
    c += 1
print(c)
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)
else:
  print(div)
a, b, x = map(int, input().split())

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

#print(a)
#print(b)

amari = a%x
a2 = amari
b2 = b-(a-amari)

#print(a2)
#print(b2)

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

count = (b-a)//x

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

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


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

print((b - a) // x + 1)
a, b, x = [int(x) for x in input().split()]
a //= x
b //= x
print(b - a)
a, b,c = map(int, input().split())
one = a//c
two = b//c
print(two-one+1)
a,b,x=map(int,input().split())
ans=abs(b-a+1)/x
print(round(ans))
a, b, x = map(int, input().split())
 
if a == 0 and b % x == 0 and x != 1:
    print((b-a)//x)
elif a % x == 0 or b % x == 0:
    print((b-a)//x + 1)
else:
    print((b-a)//x)
a, b, x = map(int, input().split())
def f(n, x):
  if n == -1:
    return 0
  return int(n/x)
print(f(b, x) - f(a-1, x))
# -*- coding: utf-8 -*-

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

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

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

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

    ans=B-A

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

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

ans = 0 if a==b else b//x - a//x + 1
print(ans)
#!/usr/bin/env python3
import sys
def input():
    return sys.stdin.readline()[:-1]

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

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

if __name__ == '__main__':
    main()
a, b, x = map(int, input().split())
count=0
print(len(range(a+a%x, b+1, x)))
a, b, x = map(int, input().split())

bb = b // x
aa = a // x

if a % 2 == 0:
  aa -= 1
  
print(bb-aa)
a,b,c=map(int,input().split())
d=0
for i in range(a,b+1):
  if i/c==1:
    d+=1
print(d)
import re
import copy

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

a,b,x = accept_input()

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

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

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

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

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

while True:
    tmp += x
    if tmp<=b:
        cnt += 1
    else:
        break
print(cnt)
a,b,x = map(int,input().split())

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

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

if a == b:
    print(0)
elif (a/x).is_integer():
    print(b//x-a//x+1)
else:
    print(b//x-a//x)
a,b,x = map(int,input().split())
ans = 0
if (b-a)%x==0:
    print((b-a)//x + 1)
elif (b-a)==0:
    print(0)
else:
    print((b-a)//x)
a,b,x = map(int,input().split())
ans = 0
if (b-a)%x==0:
    print((b-a)//x + 1)
elif (b-a)%x==0:
    print(0)
else:
    print((b-a)//x)
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 += a % x
b -= b % x
if a > b:
  print(0)
else:
  print(1 + (b - a) // x)
a, b, x = map(int, input().split())
if 1 <= b // x - a // x:
    res = b // x - a // x + 1
    print(res)
elif a==b and a % x == 0:
    print(1)
else:
    print(0)
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)
import sys
input = sys.stdin.readline
a, b, x = [int(x) for x in input().split()]
B = 1 + b // x
if a == 0:
    print(B)
else:
    A = 1 + a // x
    print(B - A)
a,b,x = map(int,input().split())
k = b-a+1
st = a%x
cnt = k//x
if st==0 or k-cnt*x>x-st:
    print(cnt+1)
else:
    print(cnt)
a,b,x=map(int,input().split())
ans=0
ans=(b-a+1)//x
r=a%x
if a+ans*x<=b-r:
    ans+=1

print(ans)
a,b,x=map(int,input().split())
#a<=y<=bでy%x=0を満たすyの個数を求める
def between(a,b,x):
    if b<x:
        print(0)
        return
    elif x==1:
        print(b-a+1)
        return
    else:
        if a<=x:
            print((b-x)//x+1)
            return
        else:
            print((b-a)//x+1)
between(a,b,x)
a,b,x=map(int,input().split())
A=a+x-((a-1)%x+1)
B=b-b%x
print(int((B-A)/x+1))
a, b, x = map(int, input().split())
if a%x == 0:
    print((b//x+1) - (a//x))
else:
    print((b//x+1) - (a//x-1))
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 - math.ceil(a/c)+1)
from decimal import *
a, b, x = map(Decimal, input().split())
a_div = (a-1) // x + 1
b_div = b // x + 1

if a == 0:
    a_div = 0
if b == 0:
    b_div = 0

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

print(b//x - (a//x-1))
# coding: utf-8

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

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

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

c = (b // x) - ((a - 1) // x)
d = c // x

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

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())
if a % x == 0 and b % x == 0 and x != 1:
    print(((b-a+1)//x)+1)
else:
    print(((b-a+1)//x))
# -*- 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):
    ans += 1

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

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

count=0
for i in range(b-a+1):
    if b<x :
        break
    if i<x-a :
        i=x-a
    if (a+i)%x == 0 :
        count+=1
        count+=(b-a-i)//x
        break
print(count)
a,b,x = map(int,input().split())

A = a//x
B = b//x
if a%x==0 or b%x==0:
    print(B-A+1)
else:print(B-A)
# -*- 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 = input().split(" ")
b = int(a[1])
x = int(a[2])
a = int(a[0])
print(int((b - a + 1) // x))
a, b, x = map(int, input().split())
d=(b-a)//x
if a%x==0 and b%x==0:
    d=d+1
    print(d)
else:
    print(d)
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,c = map(int, input().split())
if a == 0:
  print((b - a) // c + 1)
else:
  print((b - a) // c)
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(" "))
a = 0 if a - 1 < 0 else a - 1
ans = b//x + a//x

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

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

print(count)
a,b,x=map(int,input().split())
import math
ta=math.ceil(a/x)
if abs(a-ta*x)>x:
  ta=ta+1
tb=b//x
ans=tb-ta+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)
# 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:
        ans += 1

    
print(ans)
import numpy as np
a, b, x = map(int, input().split())

if  (a!= 0 and a % x == 0) or (b!= 0 and b % x == 0):
    print((b-a)//x + 1)
else:
    print((b-a)//x)
a,s,d=map(int,input().split())
print(s//d-max((a-1)//d, 0 ))
a, b, x = map(int, input().split())
print(b // x - max(0, a - 1) // x + 1 if a == 0 else 0) # aが0のときどうすりゃいいのか直感ではまったくわからんのだが
a,b,x=map(int,input().split()) 
p=a+(x-(a%x))if a%x==0 else a
q=b-(b%x)
ans =1+(q-p)//x 
print(ans)
import math

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

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())

r = 0
if ((a // x) + 1) * x > b:
    r = 0
else:
  if a % x == 0:
    a_t = a
  else:
    a_t = ((a // x) + 1) * x
  a_b = b - a_t
  if a_b == 0:
    print(1)
  else:
    r = (a_b // x) + 1
print(int(r))
a, b, x = map(int, input().split())
count = 0
if a == 0:
	count = int(b/x + 1)
else:
	count = int(b/x + 1 - ((a - 1)/x + 1))
print(count)
import collections
 
#文字列を一文字ずつ取得したいとき
def inputStrOnebyOne():
    s = list(input())
    return s
 
#整数を一つずつリストに入れる
def inputOnebyOne_Int():
    a = list(int(x) for x in input().split())
    return a
 
def main():
    a, b, x = map(int, input().split())
    ret = 0
    if b-a != 0:
        ret = int(b//x-((a-1)//x))
    print(ret)
 
if __name__=='__main__':
    main()
a, b, x = map(int, input().split())

ans = 0
p = a
while p <= b:
    if p%x == 0:
        break
    p += 1

ans = ((b-p)/x) + 1

print(ans)
a, b, x = map(int, input().split())
re = (b-a)
if a%x == 0 and b%x == 0:
    print((re//x)+1)
else:
    print(re//x)
a,b,x = map(int, input().split())
print(b//x - a//x)
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 0
ans = bcnt - acnt
print(ans)
data = [int(i) for i in input().split(" ")]
total = 0
if data[0] != data[1]:
  for i in range(data[0],data[1]+1):
    total += 1
print(total)
a, b, x = map(int, input().split())

p = 0

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

if p != 0:
    t = b-p
    s = t//x
    ans = s + 1
    print(t,s)

    print(ans)
else:
    print(0)
#!/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()
if a%x == 0 and b%x != 0:
    ans = b//x - a//x + 1 
    print(ans)
    exit()
ans = b//x - a//x 
print(ans)
from decimal import *
a, b, x = map(int, input().split())
dif = Decimal(b) - Decimal(a)
ans = dif // Decimal(x)
if Decimal(a) % Decimal(x) == 0:
    ans += 1
print(ans)
a, b, x = map(int, input().split())
def count(a, b, x):
  m = b // x + 1
  n = 0
  if a != 0:
    n = a // x + 1
    
  return m - n
  
print(count(a, b, x))
import math

a,b,x = map(int,input().split())
print(b//x - math.ceil(a/x) + 1)
from decimal import *
a, b, x = 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)
else:
  if bx == 0:
    print(bx - ax)
  else:
    print(bx - ax + 1)
a, b, x = map(int, input().split())

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

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

if p != 0:
    t = b-p
    s = t//x
    ans = s + 1
    if a == 0:
        ans += 1
    print(ans)
else:
    print(0)
a, b, x = map(int, input().split())
print(( -(a + (x - a%x)) + (b - b%x) ) // x + 1)
a,b,x = map(int,input().split())
ans = 0
if a%x==0:
    c = a
    ans = 1
else:
    c = (a//x+1)*x
    ans = 0
    
while c<b:
    c += x
    ans += 1
    #print(c)
print(ans)
a,b,x = map(int,input().split())
if a%x == 0 or b%x == 0:
    print(int((b-a)//x)+1)
elif a%x == 0 and b%x == 0:
    print(int((b-a)//x)+2)
else:
    print(int((b-a)//x))
a,b,x = map(int, input().split())

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

#print(ax)
#print(bx)#

print(bx-ax+1)
import math
a,b,x = map(int,input().split())
 
print(math.floor(b/x)-math.floor((a-1)/x))
# 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-1))
a,b,x = map(int, input().split())
print(b//x-a//x+1 if a%x==0 and b%x==0 else 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(int(Decimal(b/x)))
else:
    print(int(Decimal(b/x)) - int(Decimal((a-1)/x)))
# ABC048B
#import
import math

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

# c = math.floor((b/x)) - (math.ceil(a/x)-1)
c = (b//x) - ((a//x)-1)

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

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

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

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

n=(b-a)//x

if (b-a)-n*x-a%x>=0:
    n+=1

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

if a%2==0:
    print(int(b/x)-int(a/x)+1)
else:
    print(int(b/x)-int(a/x))
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
read = sys.stdin.read
readlines = sys.stdin.readlines
def main():
    a, b, x = map(int, input().split())

    r = (b - a) // x
    if a % x == 0 or b % x == 0:
        r += 1

    print(r)

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

q_b = b//x
q_a = a//x

if x==1:
    print(b-a+1)
else:
    print(int(q_b-q_a))
import math

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

def divided_num(n):
    return n//x + 1

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

c = b - a

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

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

print(r)
a,b,x = map(int,input().split())
ans = (b-a)//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)
import sys
input=sys.stdin.readline

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

ans = b//c - a//c
print(ans)
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())

ans=0
ans+=1*(A%X==0)
ans+=(B-A)//X

print(ans)
[a,b,x]=list(map(int,input().split()));print(b//x-a//x+1)
a, b, x = map(int, input().split(" "))

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

print("{}".format(ans))
a,b,x = map(int,input().split())
mi = a//x
ma = b//x
if (a%x == 0 or b%x == 0):
    print(ma-mi+1)
else:
    print(ma-mi)
#48b
import math
a,b,x = map(int, input().split())

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

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

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

n = b - a

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

if a%x==b%x==0:
    print(b2-a2+1)
else:
    print(b2-a2)
p=0;q=0;r=0
a,b,x=map(int,input().split())
p=int(b//x+1)
q=int((a-0.1)//x+1)
r=int(p-q)
print(int(r))
a,b,x=input().split()
a,b,x=int(a),int(b),int(x)

n=(b-a+1)//x

if n==0:
    if (b-a+1)%x>a%x:
        n+=1
elif (b-a+1)%x-(a//x*x-a)>0:
    n+=1

print(n)
a, b, x = map(int, input().split())
A = b//x
B = a//x
print(A-B+1)
a,b,x = list(map(int,input().split()))
a1 = a//x
a2 = b//x if b%x else b//x-1
print(a1-a2)
a,b,x = map(int,input().split())

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

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

c = b - a

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

bb = b // x
aa = a // x

if a % 2 == 0:
  aa -= 1
  
if a == 0:
  print(bb+1)
else:  
  print(bb-aa)
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()

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

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

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

print((b - a) // x + 1)
# -*- coding : utf-8 -*-

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

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