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-----
4 8 2

-----Sample Output-----
3

There are three integers between 4 and 8, inclusive, that are divisible by 2: 4, 6 and 8.

Difficulty: introductory

Starter code:

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


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

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

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

def generator(x, a): # 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)


def __starting_point():
    main()
__starting_point()

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


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

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

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

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

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

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

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

def __starting_point():
    # n = int(input())
    a, b, x = list(map(int, input().split()))
    c = b//x - a//x
    if a%x == 0:
        c = c+1
    print(c)

__starting_point()

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

def __starting_point():
    main()

__starting_point()

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

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


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

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


# -*- coding: utf-8 -*-

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

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

print(ans)

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

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

import sys
input = sys.stdin.readline
enum = enumerate
inf = 1001001001

import collections
import random

def linput(ty=int, cvt=list):
	return cvt(list(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)

#vD = [chr(ord("a")+i) for i in range(26)]

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]))
	#return

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):
	#a,b,c = linput()
	### 3 6 9 12 15
	### 1 2 3 4  5
	
	res = 0
	L = -(-a//c)
	R = (b//c)
	res = R-L+1
	
	return res

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

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

def __starting_point():
	#for _ in "*"*1000:
	#	deb()
	main()

__starting_point()

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


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

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

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

import math;
from decimal import *;

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

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

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


def __starting_point():
    main()
__starting_point()

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


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

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

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

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

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

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

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

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


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


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


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


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

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

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

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

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

ans = (b-a)//x

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

print(ans)


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

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

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

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


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

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

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

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

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


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

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

print((bb - aa))


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

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

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


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

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

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

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

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

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)

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

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

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


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





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

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







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

import sys
import re
import queue
import collections
import math
from decimal import *
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 typing import Callable
from decimal import Decimal, getcontext
# input = sys.stdin.readline
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 ** 8)
INF = float('inf')
MOD = 10 ** 9 + 7
num_list = []
str_list = []

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

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

def __starting_point():
	main()
__starting_point()

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

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

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)

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

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)

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

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

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

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

print(cnt)

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

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

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

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

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

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

print(cnt)

import re
import copy

def accept_input():
    a,b,x = list(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)
""" 


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

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

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


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

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

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

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


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

print(ans)

import math
import collections
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)

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

def __starting_point():
    main()

__starting_point()

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

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)

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

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

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

print(ans)

import sys, math
from itertools import combinations as c, product as p
from collections import deque
sys.setrecursionlimit(10**9)


def si(): return input()
def ii(): return int(input())
def fi(): return float(input())
def lstr(): return input().split()
def lint(): return list(map(int, input().split()))
def lint_dec(): return list([int(x) - 1 for x in input().split()])
def lnstr(n): return [input() for _ in range(n)]
def lnint(n): return [int(input()) for _ in range(n)]
def lint_list(n): return [lint() for _ in range(n)]



############################################################
a, b, x = lint()
print((b // x - (a - 1) // x))


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)

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

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

r = b//x

print((r - l) + 1)

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)

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

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

if a == 0:
    mi = -1
elif a > 1:
    mi = (a - 1) // x
else:
    mi = 0
ma = b // x if b != 0 else 0

print((ma-mi))


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

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


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


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)

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

#bを割ったときの個数からaを割ったときの個数を引く


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

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

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

# cook your dish here

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

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

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