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

if x*(b//x)<a:
  print(0)
elif x*(a//x)<a and x*(a//x+1)<a:
  print(0)
else:
  if x*(a//x)<a:
    min_n=a//x+1
  else:
    min_n=a//x
  
  max_n=b//x
  print(max_n-min_n+1)

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

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

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

Solution (Python):
a, b, x = map(int,input().split())
a2 = -(-a // x) * x
b2 = (b // x) * x
print((b2 - a2) // x + 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())
ans = b//x - (a-1)//x
print(ans)

Solution (Python):
a,b,x = map(int,input().split())
def count(c):
  if c==0:
    return 0
  return c//x
print(count(b)-count(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+1)-((a-1)//x+1))

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

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

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

if __name__ == '__main__':
    resolve()

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

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

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

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):
from sys import stdin
def main():
    readline=stdin.readline
    a,b,x=map(int,readline().split())
    if a==0:
        print(b//x+1)
    elif a==1:
        print(b//x)
    else:
        c=a-1
        print(b//x-c//x)
if __name__=="__main__":
    main()

Solution (Python):
import math

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

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

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

a_below = int((a-1)//x)

b_below = int(b//x)

ans= b_below-a_below

print(ans)

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

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

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 f(v):
    i, j = divmod(v, x)
    return i


ai = f(a - 1)
bi = f(b)
ans = bi - ai
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, 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())


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

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

Solution (Python):
import sys









mod = int(1e9+7)
INF = 1<<29

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

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

a_a = a%x
b_a = b%x
maxx = b - b_a
minx = a - a_a
ans = (maxx-minx)//x
if a_a==0:
    ans+=1

print(ans)

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

Solution (Python):

def how_many(a, b, c):
    
    A, B = (a-1)//c, b//c
    
    return B-A

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

print(how_many(a, b, x))

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

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


def calc(y):
    return y // x


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

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

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

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

l = a // x
m = b // x
n = 1 if a % x == 0 else 0

print(m - l + n)

Solution (Python):
def f(n, x):
  """0 以上 n 以下の整数のうち、x で割り切れるものの個数"""
  return n // x + 1 if n >= 0 else 0
a, b, x = [int(i) for i in input().split()]
print(f(b, x) - f(a - 1, x))

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

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

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

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

print(ans)

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

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

print(r)

Solution (Python):
def main():
    lower_limit, upper_limit, divisible_by = map(int, input().split())
    lower_limit -= 1
    print(upper_limit // divisible_by - lower_limit // divisible_by)


if __name__ == '__main__':
    main()

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

max_i = b//x

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

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

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

Solution (Python):
import sys
input = sys.stdin.buffer.readline

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

Solution (Python):
import sys
input = sys.stdin.readline

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

if __name__ == '__main__':
    main()

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

Solution (Python):
def main():
    a, b, x = [int(e) for e in input().split()]
    ac = 0 if a == 0 else (a - 1)//x + 1
    bc = b//x + 1
    print(bc - ac)


if __name__ == "__main__":
    main()

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

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

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

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

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

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

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

if b%x == 0 :
    end = b // x
else :
    end = ( b - b%x ) // x

ans = end - first + 1

print(ans)

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

Solution (Python):
A, B, X = [int(s) for s in input().split()]

def main():
    a = A // X
    if A % X != 0:
        a += 1
    b = B // X
    print(b - a + 1)

if __name__ == '__main__':
    main()

Solution (Python):
import itertools
import math
import sys
from collections import Counter
from collections import deque
from fractions import gcd
from functools import reduce
import sys
sys.setrecursionlimit(4100000)
from functools import lru_cache
INF = 1 << 60


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

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

i = 1

while x*i <= b:
    if a <= x*i:
        p = x*i
        break
    i += 1

if p != 0:
    t = b-p
    s = t//x
    ans = s + 1
    if a == 0:
        ans += 1
    print(ans)
elif a == 0:
    print(1)
else:
    print(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(" "))
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())
print((b // x) - ((a - 1) // x))

Solution (Python):



A,B,X = list(map(int, input().rstrip().split()))


index_start = A // X - (A % X == 0) 
index_end = B // X

print( index_end - index_start )

Solution (Python):
import sys, re, os
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians, floor
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
 
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()
cnt = 0






c = (a - 1) // x
d = b // x
print(d - 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 == 0:
	ans_low = 0
else:
	ans_low = (a - 1) // x + 1
	
ans_high = b // x + 1

print(ans_high - ans_low)

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

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

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

print(ans)

Solution (Python):
a,b,x=map(int,input().split())
s=b//x
t=a//x
ans=s-t
if a%x==0:
    ans+=1
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,input().split())
cnt=0




cnt1=b//x
cnt2=(a-1)//x
print(cnt1-cnt2)

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

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):
a, b, x = [int(x) for x in input().split()]
a = (a + x - 1)//x
b //= x
print(b - a + 1)

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%x == 0:
    buf1 = a//x - 1
else:
    buf1 = a//x

buf2 = b//x

print(buf2 - buf1)

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

print(ans)

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

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

print(ans)

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

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

i = 0
fa = x*i
while x*i < a:
  i += 1
  fa = x*i

if b < fa:
  print(0)
else:
  print(1+(b-fa)//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())

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

Solution (Python):
n, k, x = map(int,input().split())
if n == 0:
  print(k//x + 1)
else:
  if n%x == 0:
    print(k//x - n//x + 1)
  else:
    print(k//x - n//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())
b_count=b//x
a_count=(a-1)//x
print(b_count-a_count)

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

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

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

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

r = a % c == 0 if 1 else 0
ans = b//c - a//c + r

print(ans)

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

import sys
INF = float("inf")


def solve(a: int, b: int, x: int):
    B = b//x + 1
    A = (a-1)//x + 1
    print(B-A)
    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):
a,b,c=map(int,input().split())
r=0
if a%c==0:r=1
print(b//c-a//c+r)

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

Solution (Python):
import sys

input = sys.stdin.readline


def main():
    A, B, X = [int(x) for x in input().split()]
    print(B // X - (A - 1) // X)

if __name__ == '__main__':
    main()

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

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

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

if (a - 1) < 0:
    count_a = 0
else:
    count_a = (a - 1) // x + 1

count_b = b // x + 1

print(count_b - count_a)

Solution (Python):
"""
author : halo2halo
date : 2, Feb, 2020
"""

import sys
import itertools

import numpy as np

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

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

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

Solution (Python):
import sys

input_methods=['clipboard','file','key']
using_method=0
input_method=input_methods[using_method]

IN=lambda : map(int, input().split())
mod=1000000007



def main():
	a,b,x = IN()
	rb=b//x
	ra=(a-1)//x
	ret= rb-ra
	print(ret)
	
	

isTest=False

def pa(v):
	if isTest:
		print(v)
		
def input_clipboard():
	import clipboard
	input_text=clipboard.get()
	input_l=input_text.splitlines()
	for l in input_l:
		yield l

if __name__ == "__main__":
	if sys.platform =='ios':
		if input_method==input_methods[0]:
			ic=input_clipboard()
			input = lambda : ic.__next__()
		elif input_method==input_methods[1]:
			sys.stdin=open('inputFile.txt')
		else:
			pass
		isTest=True
	else:
		pass
		
			
	ret = main()
	if ret is not None:
		print(ret)

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

Solution (Python):
def solve(a, b, x):
    return b // x - (a - 1) // x

_a, _b ,_x = map(int, input().split())
print(solve(_a, _b, _x))

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

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

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

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

print(r-l+1)

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

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

Solution (Python):
a, b, x = [int(i) for i in 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):
arr = input().split()
arr = list(map(int,arr))
a = arr[0]
b = arr[1]
x = arr[2]

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

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

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

if x == 0:
    print("0")
elif x == 1:
    print(len(range(a, b+1)))
else:
    cnt_b = b // x
    cnt_a = (a-1) // x
    print(cnt_b - cnt_a)

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

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

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

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

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

result = to_b - to_a

print(result)

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

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

print(int(r))

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

ans = b//x - a//x + int(not(a%x))
print(ans)

Solution (Python):
a, b, x = [int(_) for _ in 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%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 main():
    a,b,x=map(int,input().split())
    if a%x>0:
        a += x-a%x
    print((b-a)//x+1)
main()

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

B = b // x

print(B - A + 1)

Solution (Python):


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

main()

Solution (Python):
A,B,X = map(int,input().split())
mA, mB = (A-1) // X, B // X
print(mB-mA)

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

Solution (Python):
INT = lambda: int(input())
INTM = lambda: map(int,input().split())
STRM = lambda: map(str,input().split())
STR = lambda: str(input())
LIST = lambda: list(map(int,input().split()))
LISTS = lambda: list(map(str,input().split()))
def do():
    a,b,x=INTM()
    if a>=1:
        cta=(a-1)//x+1
    else:
        cta=0
    ctb=b//x+1
    print(ctb-cta)
if __name__ == '__main__':
    do()

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 hoge(n, x):
    return max(n // x + 1, 0)


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

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

Solution (Python):
import sys
input=sys.stdin.readline

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

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

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

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

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

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

Solution (Python):

def aandb():
    a, b, x = map(int, input().split())
    count_a = (a - 1) // x
    count_b = b // x


    print(count_b - count_a)

aandb()

Solution (Python):
import sys
input = sys.stdin.readline
a, b, x = [int(x) for x in input().split()]
B = 1 + b // x
if a == 0:
    print(B)
elif a % x == 0:
    A = 1 + a // x
    print(B - A + 1)
else:
    A = 1 + a // x
    print(B - A)

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

cnta = max((a - 1) // x + 1, 0)
cntb = b // x + 1

print(cntb - cnta)

Solution (Python):


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

bn = b//x
an = (a-1)//x

print(bn - an)

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):
abx = input().split()
a, b, x = int(abx[0]), int(abx[1]), int(abx[2])
print(int(b//x) - int((a-1)//x))

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

Solution (Python):
def warikire(n,r):
    if r==1:
        return n+1
    else:
        return n//r+1
a,b,x=map(int,input().split())
if a==0:
    print(warikire(b,x))
else:
    print(warikire(b,x)-warikire(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())

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

print(f(b) - f(a-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,input().split())
zenbu = b // x +1
tmp = 0
if a % x == 0:
    tmp += 1
bubun = a // x +1
ans = zenbu - bubun + tmp
print(ans)

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

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

Solution (Python):
A,B,C = list(map(int,input().split()))
print((B//C-(A-1)//C))

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


import sys

def input(): return sys.stdin.readline().strip()
def list2d(a, b, c): return [[c] * b for i in range(a)]
def list3d(a, b, c, d): return [[[d] * c for j in range(b)] for i in range(a)]
def list4d(a, b, c, d, e): return [[[[e] * d for j in range(c)] for j in range(b)] for i in range(a)]
def ceil(x, y=1): return int(-(-x // y))
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(N=None): return list(MAP()) if N is None else [INT() for i in range(N)]
def Yes(): print('Yes')
def No(): print('No')
def YES(): print('YES')
def NO(): print('NO')
sys.setrecursionlimit(10 ** 9)
INF = 10 ** 18
MOD = 10 ** 9 + 7

a, b, x = MAP()


l = (a-1) // x
r = b // x
print(r - l)

Solution (Python):
from decimal import *
a, b, x = map(Decimal, input().split())
if a == 0:
    a_div = 0
else:
    a_div = (a-1) // x + 1
b_div = b // x + 1

ans = b_div - a_div
print(ans)

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

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

an = (a-1)//x + 1
bn = b//x + 1

print(bn - an)

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

Solution (Python):
import decimal
import math

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

min_x_fac = math.floor(a / x) 
max_x_fac = math.floor(b / x)

count = max_x_fac - min_x_fac
if a % x == 0:
    count += 1

print(count)

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

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

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

Solution (Python):


import sys
input = sys.stdin.readline


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

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

    print(res)



main()

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

Solution (Python):
abx=list(map(int,input().split()))
def d(a,b):
    if a<0:
        return -1
    else:
        return a//b
a=d(abx[0]-1,abx[2])
b=d(abx[1],abx[2])
print(b-a)

Solution (Python):


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

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

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

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

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

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

if a % x == 0:
    ans = 1
else:
    ans = 0
            
a = a // x 
b = b // x

ans += b - a
print(ans)

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

n = a % x
m = b % x

if n == 0:
    ca = a
else:
    ca = a + (x - n)
    if ca > b:
        flag = False

if m == 0:
    cb = b
else:
    cb = b - m

if flag:
    print((cb - ca) // x + 1)
else:
    print(0)

Solution (Python):

 
import math
import itertools
import sys
import copy
 

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

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

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

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()]
 
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 = list(map(int, input().split()))
a_n = a // x
b_n = b // x

ans = b_n - a_n
ans = ans + 1 if a % x == 0 else ans

print(ans)

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

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

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

print(str(ans))

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