Problem:
 Score : 200 points    Problem Statement You are given nonnegative integers a and b ( a ≤ b ), and a positive integer x .
Among the integers between a and b , inclusive, how many are divisible by x ?      Constraints  0 ≤ a ≤ b ≤ 10^{18}  1 ≤ x ≤ 10^{18}         Input The input is given from Standard Input in the following format:  a  b  x       Output Print the number of the integers between a and b , inclusive, that are divisible by x .        Sample Input 1 4 8 2      Sample Output 1 3  There are three integers between 4 and 8 , inclusive, that are divisible by 2 : 4 , 6 and 8 .       Sample Input 2 0 5 1      Sample Output 2 6  There are six integers between 0 and 5 , inclusive, that are divisible by 1 : 0 , 1 , 2 , 3 , 4 and 5 .       Sample Input 3 9 9 2      Sample Output 3 0  There are no integer between 9 and 9 , inclusive, that is divisible by 2 .       Sample Input 4 1 1000000000000000000 3      Sample Output 4 333333333333333333  Watch out for integer overflows.

Solution (Python):
def main():
    a, b, x = map(int,input().split())
    re_b = (b//x)+1
    if a-1 != -1:
        re_a = ((a-1)//x)+1
        print(re_b - re_a)
    else:
        print(re_b)
main()

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

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

print(f(b,x) - f(a - 1,x))

Solution (Python):
a, b, x = list(map(int, input().split()))

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

Solution (Python):
a, b, x = list(map(int, input().split()))

result = b // x - ~-a // x
print(result)

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


def count(a, n):
    return a // n

print(count(b, x) - count(a-1, x))

Solution (Python):
a,b,c=map(int,input().split())
def count(a,n):return a//n
print(count(b,c)-count(a-1,c))

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

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

Solution (Python):


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

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

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

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

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

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

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

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

nb = b // x + 1
na = (a - 1) // x + 1 if a != 0 else 0

num = nb - na

print(num)

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

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

Solution (Python):
a,b,c = map(int,input().split())
print(int(b//c - ((a-1)//c)))

Solution (Python):
a,b,x = map(int, input().split())
b_x = b // x
a_x = (a-1) // x
print(b_x-a_x)

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

def func(n):
    if n > -1:
        return n//x+1
    else:
        return 0

print(func(b)-func(a-1))

Solution (Python):
a,b,x=map(int,input().split());print(b//x-~-a//x)

Solution (Python):
a,b,x=map(int,input().split());print(b//x-~-a//x)

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

def f(p,q): 
    if p<0:
        return(0)
    else:
        return((p+q)//q)
print(f(b,x) - f(a-1,x))

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

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

if temp > b:
    print(0)
    exit()
else:
    print((b - temp) // x + 1)

Solution (Python):
a, b, x = [ int(x) for x in input().split() ]

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

print(ans)

Solution (Python):
a, b, x = [int(_) for _ in input().split()]
x_a = a // x + int(a % x != 0)
x_b = b // x
print(x_b - x_a + 1)

Solution (Python):
from statistics import mean, median,variance,stdev
import numpy as np
import sys
import math
import fractions
import itertools
import copy
from operator import itemgetter

def j(q):
    if q==1: print("Yes")
    else:print("No")
    exit(0)


def ct(x,y):
    if (x>y):print("+")
    elif (x<y): print("-")
    else: print("?")

def ip():
    return int(input())

x,y,z= (int(i) for i in input().split())       









low = (x//z)*z
if low < x: low+=z
high = (y//z)*z
print((high - low)//z+1)

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

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

print(ans)

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

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

Solution (Python):
a, b, x = map(int, input().split())
def division(n):
    if 0 <= n:
        return n//x + 1
    if n == -1:
        return 0


print(division(b) - division(a-1))

Solution (Python):
""" AtCoder """

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

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

print(f(b) - f(a - 1))

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

Solution (Python):
a, b, x = [ int(x) for x in input().split() ]

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

print(ans)

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

Solution (Python):

import sys

def main():
	a, b, x = map(int, input().split(" "))
	
	ans1 = b // x
	ans2 = (a-1) // x
	print(ans1 - ans2)
	
if __name__ == "__main__":
	main()

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

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

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

Solution (Python):
from math import ceil

import sys
sys.setrecursionlimit(10**9)
input = sys.stdin.readline
a, b, x = map(int, input().split())


def solve1():
    xa = (a-1)//x
    xb = b//x
    return xb-xa


print(solve1())

Solution (Python):

import sys

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

if __name__ == "__main__":
	main()

Solution (Python):
a,b,x =(int(i) for i in input().split())
print(b//x - (a-1)//x)

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

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

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

Solution (Python):
a, b, x = [int(_) for _ in input().split()]

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

print(result)

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

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

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

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

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

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

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

Solution (Python):
a, b, x = list(map(int, input().split()))
M = b // x

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

print(M-m)

Solution (Python):
a,b,x = [int(_) for _ in input().split()]
c =0
def get_num(rare,ru):
        return rare//ru+1 if rare >= 0 else 0
print(get_num(b,x)-get_num(a-1,x))

Solution (Python):
def f(n, x):
    if n >= 0:
        return n // x + 1
    elif n == -1:
        return 0


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

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

Solution (Python):

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

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

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

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

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

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

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

Solution (Python):
a, b, x = map(int, input().split())
def f(n):
    if n >= 0: return n//x + 1
    else: return 0
print(f(b) - f(a - 1))

Solution (Python):
A,B,X = map(int,input().split())
if A == 0:print(B//X + 1)
elif A == 1:print(B//X)
else:print(B//X - (A-1)//X)

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

def func(i):
    if i != -1:
        return i//x+ 1
    else:
        return 0

print(func(b) - func(a-1))

Solution (Python):
a,b,k=map(int,input().split())
if a%k!=0:
  a=a+k-a%k
if b%k!=0:
  b=b-b%k
  
print(max(0,(b-a)//k+1))

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

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

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

Solution (Python):
def f(n, d):
    if n == -1:
        return 0
    return n // d + 1


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

print(f(b, x) - f(a - 1, x))

Solution (Python):
a, b, x = map(int, raw_input().split())
a = (a+x-1)/x*x
b = b/x*x
print (b-a)/x+1

Solution (Python):
abx = list(map(int, input().split()))
if abx[0]%abx[2]==0:
    print(abx[1]//abx[2] - abx[0]//abx[2] + 1)
else:
    print(abx[1]//abx[2] - abx[0]//abx[2])

Solution (Python):
a, b, x = [int(x) for x in input().split()]

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

Solution (Python):
A,B,X = map(int,input().split())
mn = -(-A//X)
mx = B//X
if A == B :
    if A % X == 0:
        print(1)
    else:
        print(0)
else:
    print(mx - mn + 1)

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

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

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


def f(a, x):
    if a == -1:
        return 0
    return int(a // x) + 1


print(f(b, x) - f(a - 1, x))

Solution (Python):
def f(n, x):
  return n // x + 1 if (n >= 0) else 0
a, b, x = map(int, input().split())
print(f(b, x) - f(a - 1, x))

Solution (Python):
a, b, x = map(int, input().split())
y = b - a + 1
if (y % x == 0):
  print(y // x)
else:
  z = y // x
  a2 = a + x * z
  x1 = a if (a % x == 0) else a + (x - (a % x))
  x2 = x1 + x * z
  if (x2 <= b):
    print(z + 1)
  else:
    print(z)

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

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

Solution (Python):
a,b,x = map(int,input().split(" "))
ans = 0
if a == b and b == x:
    if b % x == 0:
        print(1)
    else:
        print(0)
else:
    D1 = b // x
    if a % x == 0:
        D2 = a // x - 1
    else:
        D2 = a // x
    print(D1 - D2)

Solution (Python):
import sys
stdin = sys.stdin
 
sys.setrecursionlimit(10**8) 
 
def li(): return map(int, stdin.readline().split())
def li_(): return map(lambda x: int(x)-1, stdin.readline().split())
def lf(): return map(float, stdin.readline().split())
def ls(): return stdin.readline().split()
def ns(): return stdin.readline().rstrip()
def lc(): return list(ns())
def ni(): return int(stdin.readline())
def nf(): return float(stdin.readline())

a,b,x = li()
left = x* -(-a//x)
right = x * (b//x)
print((right-left)//x + 1)

Solution (Python):
a, b, x = [int(i) for i in input().split()]
if a % x:
        a += x - a%x
if b % x:
        b -= b%x

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

Solution (Python):
a = input().split()
i = int(a[0])
d = int(a[1])
x = int(a[2])
rd = d // x
ri = (i - 1) // x
if (ri < 0):
	ri = -1
print(rd - ri)

Solution (Python):
s = input()
s = s.split(" ")
a = int(s[0])
b = int(s[1])
x = int(s[2])
res = b // x
res -= ((a - 1) // x)
print(res)

Solution (Python):
a = input().split()
b = []
b.append(int(a[0]))
b.append(int(a[1]))
b.append(int(a[2]))
x = b[1] // b[2]
y = (b[0] - 1) // b[2]
print(x - y)

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

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

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

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

Solution (Python):
a,b,x=map(int,input().split())
f=lambda n:0 if n<0 else n//x+1
print(f(b)-f(a-1))

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

Solution (Python):
a, b, x = list(map(int, input().split()))

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

print(ans)

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

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

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

Solution (Python):
a,b,x = (int(i) for i in input().split())
hosei = 0
if a%x == 0:
  hosei += 1
print(hosei + b//x-a//x)

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

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

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

Solution (Python):
import sys

sys.setrecursionlimit(200000)


def input():
    return sys.stdin.readline()[:-1]


def ii(t: type = int):
    return t(input())


def il(t: type = int):
    return list(map(t, input().split()))


def imi(N: int, t: type = int):
    return [ii(t) for _ in range(N)]


def iml(N: int, t: type = int):
    return [il(t) for _ in range(N)]


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


if __name__ == "__main__":
    print(solve())

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

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

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

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

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

print(f(b) - f(a - 1))

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

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

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

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

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

def count(a,b,c):
    r = b // c - a // c
    if a % c == 0:
        r += 1
    return r
if a == 0:
    ans = count(a+1,b,c) + 1
else : ans = count(a,b,c)
print(ans)

Solution (Python):


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

    aflag, bflag = a % x, b % x

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

if __name__ == "__main__":
    main()

Solution (Python):

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

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

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

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

Solution (Python):
a, b, x = list(map(int, input().split()))
reg = a//x
if a % x == 0:
    reg -= 1
print(b//x - reg)

Solution (Python):
A,B,X = map(int,input().split())

print(B//X - (A-1)//X)

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

Solution (Python):
a,b,c = map(int,input().split())
print(b//c-(a-1)//c)

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

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

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

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

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

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

Solution (Python):
a, b, x = map(int, input().split())
tmplow = -(-1* a // x)
tmpmax = b // x
print(tmpmax - tmplow + 1 if tmpmax >= tmplow else 0)

Solution (Python):
int_a, int_b, int_x = map(int, input().split())


print((int_b // int_x) - ((int_a - 1) // int_x))

Solution (Python):
a, b, x = map(int, input().split())
count_a = a // x
count_b = b // x
if a % x == 0:
    count_a -= 1
print(count_b - count_a)

Solution (Python):
a, b, x = map(int, input().split())
minM = -(- a // x)
maxM = (b // x)
print(maxM - minM + 1)

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

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

Solution (Python):
a,b,x=map(int,input().split())
af=a%x

ax=a//x
bx=b//x
ans=bx-ax
if af==0:
  ans+=1
print(int(ans))

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

Solution (Python):
a,b,x=map(int,input().split())
cnt=0


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


print(b//x - a//x +cnt)

Solution (Python):
a,b,x=map(int,input().split())
B=b//x
A=a//x

print(B-A+ (a%x == 0))

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

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

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

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

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

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

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


if __name__ == '__main__':
    main()

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

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

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

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

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

Solution (Python):
a, b, x = map(int, input().split())
a_max = max(((a-1) // x, 0))
b_max = b // x
if a == 0:
    b_max += 1
print(b_max-a_max)

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

Solution (Python):
line = input().split(" ")
a = int(line[0])
b = int(line[1])
x = int(line[2])

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

Solution (Python):
line = input().split(" ")
a = int(line[0])
b = int(line[1])
x = int(line[2])

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

Solution (Python):

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

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

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

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

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

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

Solution (Python):
def f(i,x):
   if i == -1:
        return 0
   else:
        return i//x+1

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

print(cnt)

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


qa = a // x
qb = b // x
ra = a % x

ans = qb - qa



if ra == 0:
  print(ans+1)
else:
  print(ans)

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

Solution (Python):



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


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


if __name__ == '__main__':
    solve()

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

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

Solution (Python):
a,b,x=map(int,input().strip().split(" "))
count=0

count_a=a//x
count_b=b//x

if(a%x==0):
    count_a -= 1

count=count_b - count_a

print(count)

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

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

Solution (Python):
a, b, x = list(map(int, input().split()))
ans = 0

count_a = a //x
count_b = b // x

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

ans = count_b - count_a
    
print(ans)

Solution (Python):

import math

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




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

Solution (Python):
a, b, x = list(map(int, input().rstrip().split()))

v1 = b // x + 1
v2 = 0
if a > 0:
    v2 = (a - 1) // x + 1

print(v1 - v2)

Solution (Python):
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)))

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

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

Solution (Python):

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

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

Solution (Python):
a, b, x = map(int, input().split())
ans = 0

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

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

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

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

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

Solution (Python):
T=input().split(" ")
a=int(T[0])
b=int(T[1])
x=int(T[2])
if a==0:
    print(b//x+1)
else:
    print((b//x)-((a-1)//x))

Solution (Python):


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

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

Solution (Python):
a, b, x = map(int, raw_input().split())
def f(t):
    if t==0:
        return 0
    else:
        return t/x
print f(b)-f(a-1)

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

nb = b // x + 1
na = (a-1) // x + 1 if a > 0 else 0

print(nb - na)

Solution (Python):

a,b,x = (int(_) for _ in input().split())

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

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

Solution (Python):
a, b, x = map(int, input().split())
c = (a - 1) - (a - 1) % x
print((b - c) // x)

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

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

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

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

Solution (Python):
a,b,x=map(int,input().split())
first=a-a%x+x
if(first==a+x):
  first=a
last=b-b%x

print(last//x - first//x +1)

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

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

Solution (Python):
a, b, x = map(int, input().split())
def f(n, x):
    if n >= 0:
        return n // x + 1
    elif n == -1:
        return 0
print(f(b, x) - f(a - 1, x))

Solution (Python):
from sys import stdin
il = lambda func=int: list(map(func, stdin.readline().rstrip().split()))
ils = lambda n, s="int(input())": [eval(s) for _ in range(n)]

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

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

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

print(B - A)

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


if __name__ == "__main__":
    main()

Solution (Python):
from sys import stdin


def main():
    a = next_int()
    b = next_int()
    x = next_int()

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

    print(ans)

def next_int() -> int:
    return int(next_str())


def next_str() -> str:
    result = ""
    while True:
        tmp = stdin.read(1)
        if tmp.strip() != "":
            result += tmp
        elif tmp != '\r':
            break
    return result


if __name__ == '__main__':
    main()

Solution (Python):

from sys import stdin

a,b,x = [int(x) for x in stdin.readline().rstrip().split()]

s = b//x
t = a//x
if a % x == 0:
    u = 1
else:
    u = 0

print(s-t+u)

Solution (Python):



"""
非負の整数 a, b (a≤b) と、正の整数 x が与えられます。
a 以上 b 以下の整数のうち、x で割り切れるものの個数を求めてください。
"""

test_mode = False

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

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

limit_max = b//x


ans = limit_max - limit_min + 1

print(ans)

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

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

Solution (Python):
a, b, x = map(int, input().split())
def dev_count(a):
    return a//x
ans = 0
if a == 0:
    ans = dev_count(b) + 1
else:
    ans = dev_count(b) - dev_count(a-1)
print(ans)

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

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

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

Solution (Python):
abx_input = list(map(int, input().split()))
a = abx_input[0]
b = abx_input[1]
x = abx_input[2]

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

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

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

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

Solution (Python):
from collections import defaultdict, Counter
from itertools import product, groupby, count, permutations, combinations
from math import pi, sqrt
from collections import deque
from bisect import bisect, bisect_left, bisect_right
from string import ascii_lowercase
from functools import lru_cache
import sys
sys.setrecursionlimit(10000)
INF = float("inf")
YES, Yes, yes, NO, No, no = "YES", "Yes", "yes", "NO", "No", "no"
dy4, dx4 = [0, 1, 0, -1], [1, 0, -1, 0]
dy8, dx8 = [0, -1, 0, 1, 1, -1, -1, 1], [1, 0, -1, 0, 1, 1, -1, -1]


def inside(y, x, H, W):
    return 0 <= y < H and 0 <= x < W


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


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


if __name__ == '__main__':
    main()

Solution (Python):
import sys


st = input().split()

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

isplus = 0

if a % x == 0:
    isplus = 1

bx = b // x
ax = a // x

print(int(bx - ax + isplus))

Solution (Python):
a,b,c=map(int,input().split());print(b//c-(a-1)//c)

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

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

def func(n):
    if n == -1:
        return 0

    else:
        return n // x + 1

print(func(b) - func(a - 1))

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

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

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

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

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

Solution (Python):
a,b,x = map(int, input().split())
ans = 0
ind_min = max(0,1+(a-1)//x)
ind_max = b//x + 1
ans = ind_max - ind_min
print(ans)

Solution (Python):
def divide(num,d):
    return num // d

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

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

if a == b:
  if a%x == 0:
    print(1)
  else:
    print(0)
    
  exit(0)

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

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

Solution (Python):
a, b, x = map(int, input().split())
if a != 0:
    c = b // x
    d = (a - 1) // x
elif a == 0:
    c = b // x + 1
    d = 0
print(c - d)

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

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

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

Solution (Python):


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

print(res)

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

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

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

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

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

def func(n):
    if n > -1:
        return n//x+1 
    else:
        return 0

print(func(b) - func(a-1))

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

anum = (a-1) // x
bnum = b // x

print(bnum - anum)

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

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

l = (a + x - 1) // x
r = b // x
ans = max(0, r - l + 1)
print(ans)

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

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