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

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

Solution (Python):

import os
import sys
from io import BytesIO, IOBase


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

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




BUFSIZE = 8192


class FastIO(IOBase):
    newlines = 0

    def __init__(self, file):
        self._fd = file.fileno()
        self.buffer = BytesIO()
        self.writable = "x" in file.mode or "r" not in file.mode
        self.write = self.buffer.write if self.writable else None

    def read(self):
        while True:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            if not b:
                break
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines = 0
        return self.buffer.read()

    def readline(self, **kwargs):
        while self.newlines == 0:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            self.newlines = b.count(b"\n") + (not b)
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines -= 1
        return self.buffer.readline()

    def flush(self):
        if self.writable:
            os.write(self._fd, self.buffer.getvalue())
            self.buffer.truncate(0), self.buffer.seek(0)


class IOWrapper(IOBase):
    def __init__(self, file):
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        self.write = lambda s: self.buffer.write(s.encode("ascii"))
        self.read = lambda: self.buffer.read().decode("ascii")
        self.readline = lambda: self.buffer.readline().decode("ascii")


sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)
input = lambda: sys.stdin.readline().rstrip("\r\n")



if __name__ == "__main__":
    main()

Solution (Python):
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()
    result = count_num(b, x) - count_num(a - 1, x)
    print(result)

def count_num(num, x):

    if num < 0:
        return 0

    return num // x + 1

run()

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

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

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

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

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

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

l = a//x + 1
if a % x == 0:
  l -= 1

r = b//x

print((r - l) + 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()]


b_num = b // x
a_num = (a - 1) // x if a - 1 >= 0 else -1
print(b_num - a_num)

Solution (Python):
def answer(a: int, b: int, x: int) -> int:
    return b // x - (a - 1) // x


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


if __name__ == '__main__':
    main()

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

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

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-1) //x
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):
import sys, re
from math import ceil, floor, sqrt, pi, factorial, gcd
from copy import deepcopy
from collections import Counter, deque
from heapq import heapify, heappop, heappush
from itertools import accumulate, product, combinations, combinations_with_replacement
from bisect import bisect, bisect_left, bisect_right
from functools import reduce
from decimal import Decimal, getcontext

def i_input(): return int(input())
def i_map(): return map(int, input().split())
def i_list(): return list(i_map())
def i_row(N): return [i_input() for _ in range(N)]
def i_row_list(N): return [i_list() for _ in range(N)]
def s_input(): return input()
def s_map(): return input().split()
def s_list(): return list(s_map())
def s_row(N): return [s_input for _ in range(N)]
def s_row_str(N): return [s_list() for _ in range(N)]
def s_row_list(N): return [list(s_input()) for _ in range(N)]
def lcm(a, b): return a * b // gcd(a, b)
sys.setrecursionlimit(10 ** 6)
INF = float('inf')
MOD = 10 ** 9 + 7
num_list = []
str_list = []

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

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

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):
import sys

input = sys.stdin.readline

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

a_count = (a-1) // x


b_count = b // x
print(b_count - a_count)

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

Solution (Python):


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

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

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

Solution (Python):
import math
import collections
from sys import exit
from itertools import product

ii = lambda : int(input())
mi = lambda : map(int,input().split())
li = lambda : list(map(int,input().split()))

a,b,x = mi()

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

Solution (Python):
lst = input().split()

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

if a % x != 0:
   a = x * ((a // x) + 1)

if b % x != 0:
   b = x * (b // x)

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

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

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

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

print(cnt)

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

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

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

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

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

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

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

Solution (Python):
def LI():
    return list(map(int, input().split()))


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

Solution (Python):
import sys



def input():
    return sys.stdin.readline().strip()


def input_int():
    return int(input())


def input_int_list():
    return [int(i) for i in input().split()]


def main():
    a, b, x = input_int_list()
    ans = (b // x) - (a // x)
    if a % x == 0:
        ans += 1
    print(ans)
    return


if __name__ == "__main__":
    main()

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

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

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

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 re
import copy

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

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

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

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

Solution (Python):

import sys


def solve(a: int, b: int, x: int):
    p = a // x
    q = b // x
    ans = q - p
    if a % x == 0:
        ans += 1
    print(ans)
    return



def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    a = int(next(tokens))  
    b = int(next(tokens))  
    x = int(next(tokens))  
    solve(a, b, x)

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):
import sys
input = sys.stdin.readline
enum = enumerate
inf = 1001001001

import collections
import random

def linput(ty=int, cvt=list):
	return cvt(map(ty,input().split()))

def vinput(rep=1, ty=int, cvt=list):
	return cvt(ty(input().rstrip()) for _ in "*"*rep)

def gcd(a: int, b: int):
	while b: a, b = b, a%b
	return a

def lcm(a: int, b: int):
	return a * b // gcd(a, b)

def dist(x1,y1,x2,y2):
	return abs(x1-x2)+abs(y1-y2)



def ran():
	vRan = [random.randint(1, 10),
	        random.randint(0, 10),
	        random.randint(1, 100)]
	return vRan

def bye(res):
	sT = "No Yes".split()
	print(sT[res])
	

def sol_n(a,b,c):
	res = 0
	cnt = 0
	while cnt<c:
		res += 1
		cnt += a
		if res%7==0:
			cnt += b
	return res


def sol(a,b,c):
	
	
	
	
	res = 0
	L = -(-a//c)
	R = (b//c)
	res = R-L+1
	
	return res

def deb():
	
	vI = ran()
	
	I = sol_n(*vI)
	J = sol(*vI)
	if 1:
		print(vI, I, J)

def main():
	vI = linput()
	print(sol(*vI))

if __name__ == "__main__":
	
	
	main()

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

a_x = a // x
b_x = b // x
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):
import math;
from decimal import *;

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

print(max(0, (b//x) - math.ceil(a/x) + 1))

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

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

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

bd = b // x
ad = (a-1) // x
print(bd - ad)

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

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

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

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

Solution (Python):
import sys
from sys import exit
from collections import deque
from bisect import bisect_left, bisect_right, insort_left, insort_right 
from heapq import heapify, heappop, heappush
from itertools import product, permutations, combinations, combinations_with_replacement
from functools import reduce
from math import sin, cos, tan, asin, acos, atan, degrees, radians

sys.setrecursionlimit(10**6)
INF = 10**20
eps = 1.0e-20
MOD = 10**9+7

def lcm(x,y):
    return x*y//gcd(x,y)
def lgcd(l):
    return reduce(gcd,l)
def llcm(l):
    return reduce(lcm,l)
def powmod(n,i,mod):
    return pow(n,mod-1+i,mod) if i<0 else pow(n,i,mod)
def div2(x):
    return x.bit_length()
def div10(x):
    return len(str(x))-(x==0)
def perm(n,mod=None):
    ans = 1
    for i in range(1,n+1):
        ans *= i
        if mod!=None:
            ans %= mod
    return ans
def intput():
    return int(input())
def mint():
    return map(int,input().split())
def lint():
    return list(map(int,input().split()))
def ilint():
    return int(input()), list(map(int,input().split()))
def judge(x, l=['Yes', 'No']):
    print(l[0] if x else l[1])
def lprint(l, sep='\n'):
    for x in l:
        print(x, end=sep)
def ston(c, c0='a'):
    return ord(c)-ord(c0)
def ntos(x, c0='a'):
    return chr(x+ord(c0))
class counter(dict):
    def __init__(self, *args):
        super().__init__(args)
    def add(self,x,d=1):
        self.setdefault(x,0)
        self[x] += d
class comb():
    def __init__(self, n, mod=None):
        self.l = [1]
        self.n = n
        self.mod = mod
    def get(self,k):
        l,n,mod = self.l, self.n, self.mod
        k = n-k if k>n//2 else k
        while len(l)<=k:
            i = len(l)
            l.append(l[i-1]*(n+1-i)//i if mod==None else (l[i-1]*(n+1-i)*powmod(i,-1,mod))%mod)
        return l[k]

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

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

ans = (b-a)//x

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

print(ans)

Solution (Python):
import math
from math import gcd,pi,sqrt
INF = float("inf")

import sys
sys.setrecursionlimit(10**6)
import itertools
from collections import Counter,deque
def i_input(): return int(input())
def i_map(): return map(int, input().split())
def i_list(): return list(i_map())
def i_row(N): return [i_input() for _ in range(N)]
def i_row_list(N): return [i_list() for _ in range(N)]
def s_input(): return input()
def s_map(): return input().split()
def s_list(): return list(s_map())
def s_row(N): return [s_input for _ in range(N)]
def s_row_str(N): return [s_list() for _ in range(N)]
def s_row_list(N): return [list(s_input()) for _ in range(N)]

import string

def main():
    a,b,x = i_map()
    print(b//x - (a-1)//x)

if __name__=="__main__":
    main()

Solution (Python):
import math
from decimal import Decimal
(a,b,x)=map(Decimal, input().split(" "))
print(math.floor(b/x)-math.floor((a-1)/x))

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

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

Solution (Python):
a,b,x=map(int, input().split())
from decimal import Decimal, DecimalException, getcontext
getcontext().prec = 100
from math import floor
tmp1 = floor(Decimal(b)/Decimal(x))
tmp2 = floor(Decimal(a-1)/Decimal(x))
print(tmp1 - tmp2)

Solution (Python):

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


def main():
    def f(n):
        return n // x + 1

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


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+x-1)//x + 1)

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


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

else:
    min_div = a


if(b%x != 0):
    max_div = b - (b % x)

else:
    max_div = b

print(int(max((max_div - min_div + x) // x, 0)))

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

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

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

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

bb = b // x
aa = (a - 1) // x

print(bb - aa)

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

Solution (Python):
a, b, c = map(int, input().split())
print(b // c - (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())
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())

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

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

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

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

Solution (Python):
import sys
def input(): return sys.stdin.readline().strip()

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

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



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

print(cnt)

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

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

Solution (Python):
def generator(x, a): 
    if x >= a:
        y = x
    else:
        tmp = a // x + 1
        if a % x == 0:
            tmp -= 1
        y = x * tmp

    return y


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

    if minimum > b:
        count = 0
    else:
        count = (b - minimum) // x + 1

    if a == 0:
        count += 1

    print(count)


if __name__ == '__main__':
    main()

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

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

Solution (Python):


li=list(map(int,input().split()))
if li[0]-1<0:
    print((li[1]//li[2])+1)
else:
    print((li[1]//li[2])-(li[0]-1)//li[2])

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

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

if  a%x == 0 :
    print(b//x - a//x + 1)
elif a%x is not 0 :
    print(b//x - a//x)

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

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

Solution (Python):
import math
import sys
import os
from operator import mul

sys.setrecursionlimit(10**7)

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

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

a,b,x = LI()

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

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

A=a//x

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

ar = a % x
n = b - a + 1
if ar != 0:
    n -= x - ar

ans = n // x
if n % x >= 1:
    ans += 1

print(ans)

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

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

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

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

Solution (Python):
def delete_head_zeros(n):
	n = str(n)
	l = len(n)
	if "." in n:
		l = n.find(".")
	head_zeros = 0
	for i in range(l - 1):
		if n[i] == "0":
			head_zeros += 1
		else:
			break

	return n[head_zeros:]



def bigint_compare(a, b):
	a = delete_head_zeros(a)
	b = delete_head_zeros(b)
	if len(a) > len(b):
		return 1
	elif len(a) < len(b):
		return -1
	else:
		if a > b:
			return 1
		elif a < b:
			return -1
		else:
			return 0



def bigint_plus(a, b):
	a = str(a)
	b = str(b)

	d = max([len(a), len(b)])
	a = '0' * (d - len(a)) + a
	b = '0' * (d - len(b)) + b

	ans = ""
	carry = 0
	for i in range(d):
		s = int(a[-i-1]) + int(b[-i-1]) + carry
		carry = s // 10
		ans = str(s % 10) + ans
	else:
		if carry:
			ans = str(carry) + ans

	return ans



def bigint_minus(a, b): 
	a = str(a)
	b = str(b)
	M = []
	m = []
	sign = ""

	if len(a) > len(b) or (len(a) == len(b) and a >= b):
		[M, m] = [a, b]
	else:
		[M, m] = [b, a]
		sign = "-"
	m = '0' * (len(M) - len(m)) + m

	ans = ""
	borrow = 0
	for i in range(len(M)):
		s = int(M[-i-1]) - int(m[-i-1]) - borrow
		if s < 0:
			borrow = 1
			s += 10
		else:
			borrow = 0
		ans = str(s) + ans

	return sign + delete_head_zeros(ans)



def bigint_multiply(a, b):
	a = str(a)
	b = str(b)

	md = []
	carry = 0
	for j in range(len(b)):
		mj = ""
		for i in range(len(a)):
			m = int(a[-i-1]) * int(b[-j-1]) + carry
			carry = m // 10
			mj = str(m % 10) + mj
		else:
			if carry:
				mj = str(carry) + mj
		md.append(mj)

	ans = 0
	for k in range(len(md)):
		ans = bigint_plus(md[k] + "0" * k, ans)

	return ans




def bigint_divide(a, b, d = 0):
	a = str(a)
	b = str(b)
	d = int(d)
	if d < 0:
		d = 0

	ans = ""
	r = ""
	for i in range(len(a) + d):
		q = 0
		if i < len(a):
			r += a[i]
		elif i == len(a):
			ans += "."
			r += "0"
		else:
			r += "0"

		if bigint_compare(r, b) == -1:
			ans += str(q)
		else:
			while bigint_compare(r, b) >= 0:
				r = bigint_minus(r, b)
				q += 1
			ans += str(q)

	return delete_head_zeros(ans)


a, b, x = [n for n in input().split(" ")]
c1 = bigint_divide(b, x)

if int(a) == 0:
  c2 = 0
else:
  c2 = bigint_divide(bigint_minus(a, 1), x)

if int(a) == 0:
  print(bigint_plus(bigint_minus(c1, c2), 1))
else:
  print(bigint_minus(c1, c2))

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

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

Solution (Python):
import sys, re, os
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians, gcd
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from functools import reduce
from bisect import bisect_left, insort_left
from heapq import heapify, heappush, heappop

INPUT = lambda: sys.stdin.readline().rstrip()
INT = lambda: int(INPUT())
MAP = lambda: map(int, INPUT().split())
S_MAP = lambda: map(str, INPUT().split())
LIST = lambda: list(map(int, INPUT().split()))
S_LIST = lambda: list(map(str, INPUT().split()))

sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7


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

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


if __name__ == '__main__':
    main()

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

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

print(math.floor(Decimal(b)/x) - math.ceil(Decimal(a)/x) + 1)

Solution (Python):
import sys, os, math, bisect, itertools, collections, heapq, queue, copy, array





sys.setrecursionlimit(10000000)

ii = lambda: int(sys.stdin.buffer.readline().rstrip())
il = lambda: list(map(int, sys.stdin.buffer.readline().split()))
fl = lambda: list(map(float, sys.stdin.buffer.readline().split()))
iln = lambda n: [int(sys.stdin.buffer.readline().rstrip()) for _ in range(n)]

iss = lambda: sys.stdin.buffer.readline().decode().rstrip()
sl = lambda: list(map(str, sys.stdin.buffer.readline().decode().split()))
isn = lambda n: [sys.stdin.buffer.readline().decode().rstrip() for _ in range(n)]

lcm = lambda x, y: (x * y) // math.gcd(x, y)

MOD = 10 ** 9 + 7
INF = float('inf')


def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

    A, B, X = il()
    print((B // X) - ((A - 1) // X))


if __name__ == '__main__':
    main()

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

Solution (Python):
from sys import stdin, stdout
from time import perf_counter

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

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


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

Solution (Python):
import sys
import re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

a, b, x = MAP()

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

Solution (Python):
import sys, re, os
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from fractions import gcd
from bisect import bisect, bisect_left, bisect_right

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

a, b, x = MAP()

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

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

Solution (Python):




import sys
from io import StringIO
import unittest


class TestClass(unittest.TestCase):
    def assertIO(self, input, output):
        stdout, stdin = sys.stdout, sys.stdin
        sys.stdout, sys.stdin = StringIO(), StringIO(input)
        resolve()
        sys.stdout.seek(0)
        out = sys.stdout.read()[:-1]
        sys.stdout, sys.stdin = stdout, stdin
        self.assertEqual(out, output)

    def test_入力例_1(self):
        input = """4 8 2"""
        output = """3"""
        self.assertIO(input, output)

    def test_入力例_2(self):
        input = """0 5 1"""
        output = """6"""
        self.assertIO(input, output)

    def test_入力例_3(self):
        input = """9 9 2"""
        output = """0"""
        self.assertIO(input, output)

    def test_入力例_4(self):
        input = """1 1000000000000000000 3"""
        output = """333333333333333333"""
        self.assertIO(input, output)


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

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


if __name__ == "__main__":
    
    resolve()