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):
import sys
import math
import collections
import itertools
import array
import inspect


sys.setrecursionlimit(1000000)



def chkprint(*args):
    names = {
        id(v): k
        for k, v in inspect.currentframe().f_back.f_locals.items()
    }
    print(', '.join(
        names.get(id(arg), '???') + ' = ' + repr(arg) for arg in args))



def to_bin(x):
    return bin(x)[2:]


def li_input():
    return [int(_) for _ in input().split()]


def gcd(n, m):
    if n % m == 0:
        return m
    else:
        return gcd(m, n % m)


def gcd_list(L):
    v = L[0]

    for i in range(1, len(L)):
        v = gcd(v, L[i])

    return v


def lcm(n, m):
    return (n * m) // gcd(n, m)


def lcm_list(L):
    v = L[0]

    for i in range(1, len(L)):
        v = lcm(v, L[i])

    return v



def wfs_d(D, N, K):
    """
    D: 隣接行列(距離付き)
    N: ノード数
    K: 始点ノード
    """

    dfk = [-1] * (N + 1)
    dfk[K] = 0

    cps = [(K, 0)]
    r = [False] * (N + 1)
    r[K] = True
    while len(cps) != 0:
        n_cps = []
        for cp, cd in cps:
            for i, dfcp in enumerate(D[cp]):
                if dfcp != -1 and not r[i]:
                    dfk[i] = cd + dfcp
                    n_cps.append((i, cd + dfcp))
                    r[i] = True

        cps = n_cps[:]

    return dfk



def dfs_d(v, pre, dist):
    """
    v:  現在のノード
    pre: １つ前のノード
    dist: 現在の距離

    以下は別途用意する
    D: 隣接リスト(行列ではない)
    D_dfs_d: dfs_d関数で用いる，始点ノードから見た距離リスト
    """

    global D
    global D_dfs_d

    D_dfs_d[v] = dist

    for next_v, d in D[v]:
        if next_v != pre:
            dfs_d(next_v, v, dist + d)

    return


def sigma(N):
    ans = 0
    for i in range(1, N + 1):
        ans += i
    return ans


class Combination:
    def __init__(self, n, mod):

        g1 = [1, 1]
        g2 = [1, 1]
        inverse = [0, 1]
        for i in range(2, n + 1):
            g1.append((g1[-1] * i) % mod)
            inverse.append((-inverse[mod % i] * (mod // i)) % mod)
            g2.append((g2[-1] * inverse[-1]) % mod)
        self.MOD = mod
        self.N = n
        self.g1 = g1
        self.g2 = g2
        self.inverse = inverse

    def __call__(self, n, r):
        if (r < 0 or r > n):
            return 0
        r = min(r, n - r)
        return self.g1[n] * self.g2[r] * self.g2[n - r] % self.MOD




dp = None


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

    return n // x + 1


def main():
    a, b, x = li_input()

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


main()

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()))
ans = max((b//x)-((a-1)//x),0)
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())
def cal(n, x):
    if n== -1:
        return 0
    else:
        return n // x + 1
print(cal(b, x) - cal(a-1, x))

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

Solution (Python):

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

def f(x, y):
    r = y//x + 1
    return r
    
ans = f(x, b) - f(x, a-1)

print(ans)

Solution (Python):

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

A=a//x
B=b//x
C=0
if a%x==0:
    C+=1
print(B-A+C)

Solution (Python):


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

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

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

if __name__ == '__main__':
    main()

Solution (Python):


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

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

if __name__ == '__main__':
    main()

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

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

Solution (Python):
def abc(n,x):
    if(n==-1):
        return 0
    else:
        return n//x+1
a,b,x = map(int,input().split())
print(abc(b,x)-abc(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):
from math import floor
a,b,x = map(int, input().split())
if a == 0:
    na = -1
elif a < x:
    na = 0
else:
    if a % x == 0:
        na = a//x-1
    else:
        na = a//x
nb = b//x
print(nb-na)

Solution (Python):

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

    ans=(b - a+1)//x
    amari = (b-a+1)%x

    if amari ==0:
        print(ans)
        exit()
    if a%x ==0:
        ans+=1
    elif amari > x- (a%x):
        ans+=1

    print(ans)


if __name__ == "__main__":
        main()

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

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

f=0

if b%c==0 and a%c==0:
    f+=1

if a==0 and b==0:
    print(1)
elif a==0:
    print(b//c+1)
else:
    print(b//c-(a-1)//c)

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

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

last = b - (b % x)

if first == last:
    ans = 1
else:
    ans = (last - first - 1) // x + 2
print(ans)

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

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

print(f_n(b,z)-f_n(a-1,z))

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

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

Solution (Python):
from math import floor, ceil
a, b, x = list(map(int, input().split()))

if a == 0 and b == 0:
    print(1)
elif a%x == 0 and b%x == 0:
    print((b-a)//x+1)
elif a%x == 0:
    b_ = (b//x)*x
    print((b_-a)//x+1)
elif b%x == 0:
    a_ = ((a//x)+1)*x
    print((b-a_)//x+1)
else:
    a_ = ((a//x)+1)*x
    b_ = (b//x)*x
    print((b_-a_)//x+1)

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

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

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

start = a
end = b + 1
if a % x != 0:
    start += x - a % x
ans = len(range(start, end, x))

print(ans)

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

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

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

print(b // x - a // x + (a % x == 0))

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

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

Solution (Python):


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

Solution (Python):
from decimal import Decimal
a, b, x = map(Decimal, input().split())
bx = (b/x)
aq, amod = divmod(a, x)
if a==0 or amod==0:
    print(int(bx-aq)+1)
else:
    print(int(bx-aq))

Solution (Python):


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








all_num = b // x
lower_num = (a - 1) // x
print(all_num - lower_num)

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

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 = list(map(int, input().split()))

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

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

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,raw_input().split())
print b/x - (a-1)/x

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

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

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

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

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

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

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

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

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

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

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

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

ika = (a-1)//x
zenbu = b//x

print(zenbu - ika)

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

Solution (Python):
val = [int(x) for x in input().split()]
res = (val[1]//val[2]-(val[0]-1)//val[2])
print(res)

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())
ansa=int((a-1)//x)+1
ansb=int(b//x)+1
ans=ansb-ansa
print(ans)

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

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

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

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

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

Solution (Python):
from sys import stdin

a,b,x = stdin.readline().rstrip().split()
count = 0
a_int = int(a)
b_int = int(b)
x_int = int(x)
count = (b_int // x_int) - ((a_int-1) // x_int)

print(count)

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

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

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

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

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


if __name__ == '__main__':
    main()

Solution (Python):
a, b, x = map(int, raw_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:
    s = a//x
else:
    s = a//x+1

t = b//x

print(t-s+1)

Solution (Python):
from collections import Counter


def getinputdata():
    
    array_result = []

    data = input()

    array_result.append(data.split(" "))

    flg = 1

    try:

        while flg:

            data = input()

            array_temp = []

            if (data != ""):

                array_result.append(data.split(" "))

                flg = 1

            else:

                flg = 0
    finally:

        return array_result

arr_data = getinputdata()

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



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

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

Solution (Python):
from math import ceil, floor
a, b, x = [int(elem) for elem in input().split(' ')]

lower_bound = a // x + min(1, a % x)
upper_bound = b // x
print(upper_bound - lower_bound + 1)

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

Solution (Python):
a, b, x = list(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())

k,l = a//x,b//x

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

print(l-k)

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

d = a//c
e = a%c
f = b//c

if e == 0:
    print(f-d+1)
else:
    print(f-d)

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

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

Solution (Python):





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

    
    
    fb = (b // x) + 1
    fa = ((a - 1) // x) + 1

    if a == 0:
        print(fb)
    else:
        print(fb - fa)

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

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

Solution (Python):
a, b, x = [int(i) for i in 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 = list(map(int, input().split()))
biggest = b // x
lowest = (a + x - 1) // x
print(biggest - lowest + 1)

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

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

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

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

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


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

c = func(b, x) - func(a-1, x)
print(c)

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

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

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

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

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

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

Solution (Python):
s = input()
a, b, x = map(int, s.split(' '))
cnt = 0
a_cnt = (a - 1) // x
b_cnt = b // x

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

Solution (Python):
from math import ceil
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 = [int(x) for x in input().split()]
print(b // x - (a - 1) // x)

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

n_b = b//x

ans += n_b-n_a
print(ans)

Solution (Python):

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

u = b // x
l = (a + x - 1) // x

print(u - l + 1)

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

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

    print(ans)

if __name__ == '__main__':
    main()

Solution (Python):
val = [int(x) for x in input().split()]
res = (val[1]//val[2]-(val[0]-1)//val[2])
print(res)

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):
S = input().split()
a = int(S[0])
b = int(S[1])
x = int(S[2])
def func(n, x): 
    ans=0
    if n>=0:
        ans+=(n//x)+1
    else:
        ans=0
    return int(ans)

answer = func(b, x) - func(a-1, x)
print(answer)

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

i = a
count = 0
count_b = 0
count_a = 0

count_b = b/x
count_a = (a-1)/x


print count_b - count_a

Solution (Python):
s = input()
a, b, x = map(int, s.split(' '))
cnt = 0
a_cnt = (a - 1) // x
b_cnt = b // x

print(b_cnt - a_cnt)

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=list( int(i) for i in input().split() )
count=0

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

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

total = b // x

if a == 0:
  print(total + 1)
elif a >= x:
  ex = (a-1) // x
  print(total - ex)
else:
  print(total)

Solution (Python):
a, b, x = map(int, input().split())
ans = (b // x) - (max(a-1, 0) // x)
if a == 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 = [int(i) for i 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())
print(b // x - (a - 1) // x)

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

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

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

print(sum)

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

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

Solution (Python):
if __name__ == "__main__":
    A,B,C = map(int, input().split())
    result = B // C
    result -= A // C
    if (A % C == 0):
        result += 1
    print (result)

Solution (Python):
import sys

for inputline in [inputline.strip() for inputline in sys.stdin]:
	a, b, x = map(int, inputline.split())
	print (b/x)-((a-1)/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())
if a != 0:
    print(b//x  - (a-1)//x)
else:
    print(b//x + 1)

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

Solution (Python):
import sys




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


def read_str_list():
    return input().split()


def read_int():
    return int(input())


def read_str():
    return input()


def solve(a, b, x):
    if a > 0:
        return solve(0, b, x) - solve(0, a - 1, x)
    return b // x + 1


def main():
    a, b, x = read_int_list()
    res = solve(a, b, x)
    print(res)


main()

Solution (Python):
input_line = map(int,raw_input().split(" "))
a = input_line[0]
b = input_line[1]
x = input_line[2]

n = b / x
m = a / x
if a % x == 0:
	print n - m + 1
else:
	print n - m

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

Solution (Python):
from collections import defaultdict


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


if __name__ == '__main__':
    main()

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

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

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

Solution (Python):
import math

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

aan = math.floor(a // x)
ban = math.floor(b // x)

ans = ban - aan
if a % x == 0:
    ans += 1
print(ans)

Solution (Python):
def ri(): return int(input())
def rli(): return list(map(int, input().split()))
def rls(): return list(input())
def pli(a): return "".join(list(map(str, a)))

a, b, x = rli()
print(b//x - (a-1)//x)

Solution (Python):
import sys
import math
from functools import reduce


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

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

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

first = a/x
if a%x > 0 : first += 1
last = b/x
ans = last - first + 1
print ans

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

def f(n1, n2):
    if n1 >= 0:
        return n1//n2+1
    else:
        return 0

print(f(b,x)-f(a-1,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, raw_input().split())
print (b / x - (a-1) / x)

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

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

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

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

print(count)

Solution (Python):

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

Solution (Python):

def calc(a,x):
    if a < 0:
        return -1
    return a//x

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

if __name__ == "__main__":
    main()

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

Solution (Python):
from collections import defaultdict


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


if __name__ == '__main__':
    main()

Solution (Python):
import sys

def debug(x, table):
    for name, val in table.items():
        if x is val:
            print('DEBUG:{} -> {}'.format(name, val), file=sys.stderr)
            return None

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


if __name__ == '__main__':
    solve()

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

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

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

qa = a // x
qb = b // x
ra = a % x
rb = b % x
res = qb - qa
if ra == 0:
    res += 1

print(res)

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

def bibe(n, x):
    return n // x

ans = bibe(b, x) - bibe(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 math
import sys
a, b, x = map(int,input().split())
"""
if a == b:
    if a%x == 0:
        print(1)
    else:
        print(0)
    sys.exit()
"""
if a%x == 0:
    ans= b // x - a // x + 1
else:    
    ans= b // x - a // x

print(ans)

"""
for tmp in range (a, b+1):
    if tmp % x == 0:
        ans += 1
"""

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

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

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

print(counter)

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

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

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

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

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

if __name__ == '__main__':
    main()

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

p = a//x
r = a%x
q = b//x
s = b%x

if r == 0:
    print(q - p + 1)
else:
    print(q - p)

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

Solution (Python):
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time

sys.setrecursionlimit(10**7)
inf = 10**20
mod = 10**9 + 7

def LI(): return list(map(int, input().split()))
def II(): return int(input())
def LS(): return input().split()
def S(): return input()


def main():
    a,b,x = LI()
    return b//x - a//x + (1 if a%x==0 else 0)


print(main())

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

if __name__ == '__main__':
    main()

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, raw_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):
from math import *
a, b, x = map(int, raw_input().split())
print (b / x + 1) - ((a - 1) / x + 1)

Solution (Python):
a, b, x= map(int, raw_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,raw_input().split())
res=b/x
if a!=0:
 res-=(a-1)/x
else:
 res+=1
print res

Solution (Python):
s = input().split(" ")
x=int(s[0])
z=int(s[2])
y=int(s[1])//int(s[2])
if x%z==0:
    x=x//z
else:
    x=x//z+1
print(y-x+1)

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

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

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

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

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

Solution (Python):


import math


if __name__ == "__main__":
	data = list(map(int,input().split()))
	a = data[0]
	b = data[1]
	x = data[2]
	if a%x == 0:
		print((b-a)//x+1)
	else:
		if x > b:
			print("0")
		else: 
			if x < a:
				print((data[1]-(a+(x-a%x)))//data[2]+1)
			else:
				print((data[1]-data[2])//data[2]+1)

Solution (Python):
import sys

def f(num,div):
 if num==-1:
  return 0
 return num/div+1

A,B,D = map(int, raw_input().split())

num1=f(A-1,D)
num2=f(B,D)

print num2-num1

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

B=(b//x)*x
if B>=A:
    print((B-A)//x+1)
else:
    print(0)

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

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, raw_input().split())
print b / x - (a-1) / x

Solution (Python):
from decimal import Decimal

a,b,c=[int(i) for i in input().split()]
num1=(Decimal(b)/Decimal(c))
if(a%c==0):
    num2=int(Decimal(a)/Decimal(c))-1
else:
    num2=int(Decimal(a)/Decimal(c))

print(int(num1-num2))

Solution (Python):
a,b,x=map(int,raw_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());a-=1;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())
print(b // x - (a-1) // x)

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

Solution (Python):
from sys import stdin
n,m,x = map(int,stdin.readline().split())
print m/x - (n-1)/x

Solution (Python):
a, b, x = list(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())
 
def count(num1, num2):
  return num1 // num2
 
c = count(b, x)
d = count(a-1, x)
 
ans = c-d
print(ans)

Solution (Python):

import math as math

nums = list(map(int, input().split()))

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

x1 = (a-1) // x
x2 = b // x

ans = x2 - x1
print(ans)

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


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


print(ans)

Solution (Python):
import sys

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

if a == 0 and b == 0:
    print(1)
    sys.exit()

elif a == 0 or b == 0:
    print(c + 1)
    sys.exit()

print(c - d)

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

Solution (Python):

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

Solution (Python):


import sys

def main(argv):
    for line in sys.stdin:
        a, b, x = line.rstrip("\n").split(" ", 3)
        a = int(a)
        b = int(b)
        x = int(x)

        start_index, start_reminder = divmod(a, x)
        end_index, end_reminder = divmod(b, x)

        result = end_index - start_index
        if a == 0 or start_reminder == 0:
            result += 1
        print result

if __name__ == "__main__":
    main(sys.argv)

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

Solution (Python):

"""Between a and b ...

@author: Liz
@modified: 12-04-2016

"""

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


def solve():

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

print(solve())

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

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


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

print(ans)

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

Solution (Python):
a, b, c = list(map(int, input().split()))
a1 =  int(a // c)  
if a % c == 0:
    r = 1
else :
    r = 0

b1 = int(b // c)
v = int(b1 - a1 +r)

print(v)