peterverebics/CodeNet_Python_118 huggingface dataset:
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits

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

print(b//x-(a-1)//x)
# -*- coding: utf-8 -*-

def main():

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

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

    print(ans)


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



print(b//x-(a-1)//x)
# Vicfred
# https://atcoder.jp/contests/abc048/tasks/abc048_b
# math
a, b, x = list(map(int, input().split()))
print(b//x - (a-1)//x)
a,b,x=map(int,input().split())
ans=b//x-a//x
print(ans+1 if a%x == 0 else ans)
import sys

read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 9)
INF = 1 << 60
MOD = 1000000007


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

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

    print(ans)
    return


if __name__ == '__main__':
    main()
def main():
    a,b,x=map(int,input().split())
    if a%x>0:
        a += x-a%x
    print((b-a)//x+1)
main()
a,b,c=map(int,input().split())
def f(x,c):
    if x==-1:
        return 0
    else:
        return x//c+1
print(f(b,c)-f(a-1,c))
# coding: utf-8
a,b,x=map(int,input().split())
ans=b//x-a//x
if a%x==0:
    ans+=1
    
print(ans)
#!/usr/bin/env python3
a, b, x = map(int, input().split())
print(b//x-(a-1)//x)
a, b, x = map(int, input().split())

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

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

r = b//x

print((r - l) + 1)
from decimal import *
a, b, x = map(int, input().split())
ax = int(Decimal(a) / Decimal(x))
bx = int(Decimal(b) / Decimal(x))
am = a % x
bm = b % x
if ax == bx and am != 0 and bm != 0:
  print(0)
elif am == 0:
  print(bx - ax + 1)
else:
  print(bx - ax)
import sys
input = sys.stdin.readline

a, b, x = map(int, input().split(' '))
m = b//x+1
n = 0
if a > 0:
    n = (a-1)//x+1
ans = m - n
print(ans)
a,b,x = map(int,input().split())
ans = b//x - (a+x-1)//x + 1
print(ans)
a, b, x = map(int, input().split())

print(b // x + 1 - ((a - 1) // x + 1))
import sys
input = sys.stdin.readline

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

def main():
    mod=10**9+7
    a,b,x=MI()
    ans=b//x-(a-1)//x
    print(ans)

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

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

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

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

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

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

p = b // x - a // x
if a % x == 0:
    p += 1
print(p)
A,B,X = map(int,input().split())
print(((B//X)*X+(-A//X)*X)//X+1)
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))
a,b,x = list(map(int,input().split()))

ans=0
if a!=b:
    A = (a-1)//x
    B = b//x

    ans = B - A
elif a==0 and b==0:
    ans=1
    
elif a==x and b==x:
    ans=1

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

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

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

print(ans)
import decimal
decimal.getcontext().prec=50
a,b,x=map(int,input().split())
a=decimal.Decimal(a)
b=decimal.Decimal(b)
print(int(b/x)-int((a+x-1)/x)+1)
a,b,x=map(int,input().split())
if x==1:
  print(b-a+1)
else:
  print(b//x-(a-1)//x)
a,b,x=(int(x) for x in input().split())

if a==0:
    print(1+b//x)
else:
    c=b//x-(a-1)//x
    print(c)
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))
import math
from decimal import *
a, b, x = map(int, input().split(" "))
print(math.floor(Decimal(b)/Decimal(x)) - math.ceil(Decimal(a)/Decimal(x)) + 1)
a,b,x = map(int,input().split())
a -= 1

ans = b//x - a//x

print(ans)
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)
"""
A,B,X=map(int,input().split())
a=A%X
b=B%X
if a!=0:
    A=A+X-a
if b!=0:
    B=B-b
print((B-A)//X+1)
a,b,x = map(int, input().split())

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

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

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

print(r-l+1)
import sys


def input(): return sys.stdin.readline().strip()
def I(): return int(input())
def LI(): return list(map(int, input().split()))


a, b, x = LI()
acnt = (a - 1) // x if a > 0 else -1
bcnt = b // x if b != 0 else 1
ans = bcnt - acnt if not(a == b == 0) else 1
print(ans)
a, b, x = map(int,input().split())
print(b//x + (-a//x) + 1)
a,b,x=map(int,input().split())
t1 = (a-1)//x
t2 = b//x
res = t2-t1
print(res)
# -*- coding: utf-8 -*-
a, b, x = map(int,input().split())

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

a1 = -(-a//x) * x
b1 = b//x * x

print((b1-a1)//x+1)
x,y,z=list(map(int, input().split()))
ans=0

if (y-x)//z==0:
	if x%z > y%z:
		ans=ans+1
	if x%z==0 or y%z==0:
		print(1)
	else:
		print(ans)
else:
	ans=((y//z)-((x-1)//z))
	if x==0:
		ans=ans
	print(ans)
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))
start, end, div = list(map(int, input().strip().split()))

count = end // div - start //div

if start % div == 0:
  count += 1
print(count)
a,b,x=map(int,input().split())
k=a//x
l=a%x
p=b//x
q=b%x
if l==0:
    print(p-k+1)
else:
    print(p-k)
import sys
from collections import Counter
from collections import deque
import math
import fractions
def input(): return sys.stdin.readline().strip()
def mp(): return map(int,input().split())
def lmp(): return list(map(int,input().split()))

a,b,x=mp()
print(b//x-(a-1)//x)
a, b, x = map(int, input().split())
c = a // x
d = b // x
if a % x == 0:
    c -= 1
print(d - c)
a,b,x = 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 = map(int, input().split())
print(b//x - (-(-a//x)) + 1)
a,b,x=list(map(int,input().split()))
print(b//x - (a-1)//x)
import math as m
from decimal import *
a,b,x = map(int,input().split())
tot = b-a+1
rem = a%x
getcontext().prec = 100
if rem > 0:
  tot-=x-rem
print(m.ceil(Decimal(tot)/Decimal(x)))
l = list(map(int,input().split()))
a = l[0]
b = l[1]
x = l[2]
if a%x == 0:
	print(b//x-a//x +1)
else:
	print(b//x-a//x)
a, b, x = map(int, input().split())

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

print(ans)
a,b,x=map(int,input().split())
if a%x == 0:
    print(b//x-a//x+1)
else:
    print(b//x-a//x)
# B - Between a and b ...
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()
a,b,x = map(int, input().split())

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


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


ans = f(b) - f(a - 1)
print(ans)
import math
import sys
import numpy as np
from decimal import *
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
# ----------------------------------------
a, b, x = map(int, readline().split())

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

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

if a == 0:
  print(b//x + 1)
else:
  print(b//x - (a-1)//x)
a,b,x=map(int, input().split())
print(b//x-((a-1)//x+1)+1)
import math
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())
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)
# 2020/05/03
# AtCoder Beginner Contest 048 - B

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

# Calc
wk_v1 = (a - 1) // x
wk_v2 = b // x
ans = wk_v2 - wk_v1

# Output
print(ans)
A,B,X = list(map(int,input().split()))
print(B//X-(A-1)//X)
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)
a, b, x = [int(_) for _ in input().split()]

ans = b//x - a//x
if a%x == 0:
    ans += 1
print(ans)
import math
a, b, x = map(int,input().split())
def fnc(n,x):
    if n == -1:
        return 0
    return n//x+1
print(fnc(b,x) - fnc((a-1),x))
a,b,x = map(int, input().split())
hoge = b//x - a//x
if a%x == 0:
    hoge += 1
print(hoge)
a, b, x = map(int, input().split())
ans = b // x - a // x
if a % x == 0:
    ans += 1
print(ans)
import bisect, collections, copy, heapq, itertools, math, string, sys
input = lambda: sys.stdin.readline().rstrip() 
sys.setrecursionlimit(10**7)
INF = float('inf')
def I(): return int(input())
def F(): return float(input())
def SS(): return input()
def LI(): return [int(x) for x in input().split()]
def LI_(): return [int(x)-1 for x in input().split()]
def LF(): return [float(x) for x in input().split()]
def LSS(): return input().split()

def resolve():
    a, b, x = LI()

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

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

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

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

input = sys.stdin.readline


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


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

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


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

n = b // x
m = (a-1) // x

print(n-m)
a, b, x = map(int, input().split())

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

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

i = a// x
j = b// x
p = i* x
q = j* x
while i* x < a:
  i+= 1
  p = i* x
while j* x < b:
  j+= 1
  q = (j- 1)* x

ans = int((q- p)// x)+ 1

if(ans<= 0):
  print(0)
else:
  print(ans)
a, b, x = 4, 8, 3
a, b, x = 0, 5, 1
a, b, x = 9, 9, 2
a, b, x = 1, 1000000000000000000, 3

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


def calculate(a, b, x):
    s1 = (a - 1) // x

    if s1 < 0:
        s1 = 0
    else:
        s1 += 1
    s2 = b // x + 1

    print(s2 - s1)


calculate(a, b, x)
a,b,x = map(int,input().split())
mx = b//x
mn = (a-1)//x
print(mx-mn)
import sys
readline = sys.stdin.buffer.readline

a,b,x = map(int,readline().split())
import math
low = (a+x-1)//x
high = b//x

print(high-low+1)
#!/usr/bin/env python3
a, b, x = map(int, input().split())

print((b // x) - ((a - 1) // x))
import math
a,b,c=[int(i) for i in input().split()]
print(b//c - (a-1)//c)
a,b,x = map(int,input().split())
l,r = 0,0
if a%x == 0:
    l = a//x
else:
    l = a//x + 1
r = b//x

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

r = b // x
l = a // x

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

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

print(result)
a, b, x = map(int, input().split())
b_ans = b // x
a_ans = (a - 1) // x
print(b_ans - a_ans)
# https://atcoder.jp/contests/abc048/tasks/abc048_b

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

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

bd = b // x
ad = (a-1) // x
print(bd - ad)
import sys
import itertools
sys.setrecursionlimit(1000000000)
from heapq import heapify,heappop,heappush,heappushpop
import math
import collections
MOD = 10**9+7

a,b,x = map(int,input().split())
if a == 0:
    ans = b//x + 1
else:
    ans = b//x - (a-1)//x
print(ans)
import sys
#import numpy as np
import math
from fractions import Fraction
import itertools

input=sys.stdin.readline

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

print( b//x - (a-1)//x)
from sys import stdin


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


def floor(a,b):
    return a//b


if __name__ == "__main__":
    _in = [_.rstrip() for _ in stdin.readlines()]
    a,b,x = list(map(int,_in[0].split(' ')))  # type:list(int)
    # vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
    cnt = floor(b,x)-ceil(a,x)+1
    # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    print(cnt)
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=[int(i) for i in input().split()]

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

_a, _b ,_x = map(int, input().split())
print(solve(_a, _b, _x))
a,b,x=map(int,input().split());print((b//x)-((a-1)//x))
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)
import sys
def main():
    a,b,x=tuple(map(int,sys.stdin.readline().split()))
    res=b//x-a//x if a%x!=0 else b//x-a//x+1
    print(res)
if __name__=='__main__':main()
"""
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)
def resolve():
	a, b, x = map(int, input().split())
	print(b // x - (a-1) // x)
resolve()
import sys
input = sys.stdin.buffer.readline

#sys.setrecursionlimit(10**9)
#from functools import lru_cache

def RD(): return sys.stdin.read()
def II(): return int(input())
def MI(): return map(int,input().split())
def MF(): return map(float,input().split())
def LI(): return list(map(int,input().split()))
def LF(): return list(map(float,input().split()))
def TI(): return tuple(map(int,input().split()))
# rstrip().decode()

def main():
	a,b,x=MI()
	ans=(b-a)//x

	c=a+x*ans

	if b//x*x==-(-c//x)*x:
		ans+=1

	print(ans)






if __name__ == "__main__":
	main()
a,b,x=map(int,input().split())
aw=a//x
bw=b//x
ans=bw-aw

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

print(ans)
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())
num1=-(a//-x)
num2=b//x
print(num2-num1+1)
a,b,x = map(int,input().split())
print(b // x - (a-1) // x)
if __name__ == '__main__':
    a, b, x = map(int, input().split())
    l = b // x
    r = (a-1) // x
    print(l - r)
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())

# print(a)
# print(b)
# print(x)

if a%x==0:
    print((b//x)-(a//x)+1)
else:
    print((b//x)-(a//x))
a,b,x = map(int,input().split())
def func(n):
    if n > -1:
        return n//x + 1 
    else:
        return 0
print(func(b)-func(a-1))
a, b, x = map(int, input().split())
c = b // x + 1
d = 0
if a - 1 > -1:
  d = (a - 1) // x + 1
else:
  d = 0
print(c - d)
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 = 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,x = map(int,input().split())
b = b // x + 1
a = (a - 1) // x + 1
print(b - a)
(a, b, x) = map(int, input().split())

n_lt_a = a // x + 1
n_lt_b = b // x + 1

if a % x == 0:
    ans = n_lt_b - n_lt_a + 1
else:
    ans = n_lt_b - n_lt_a
print(ans)
a,b,x = map(int,input().split())
print((b//x+1)-((a-1)//x+1))
a, b, x = map(int, input().split())
x_min = (a - 1) // x
x_max = b // x
if x_max >= x_min:
    print(x_max - x_min)
a, b, x = map(int, input().split())
if a == 0:
  print(b // x + 1)
else:
  print(b // x - (a - 1) // x)
from math import ceil,floor,comb,factorial,gcd,pow,sqrt,log2,cos,sin,tan,pi,inf
from itertools import accumulate,permutations,combinations,product,combinations_with_replacement
from collections import deque,defaultdict,Counter
from bisect import bisect_left,bisect_right
from operator import itemgetter
from heapq import heappop,heappush
from copy import deepcopy
from time import time
import string
import sys
sys.setrecursionlimit(10 ** 7)
def input() : return sys.stdin.readline().strip()
def INT()   : return int(input())
def MAP()   : return map(int,input().split())
def LIST()  : return list(MAP())

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

ans = b//x -(a-1) //x
print(ans)
a, b, x = map(int, input().split())
res = int(b//x - (a-1)//x)
print(res)
# ABC048 B Between a and b...

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

_a = a//x
m_a = a%x
_b = b//x

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

print(b // x - (a - 1) // x)
a,b,x=map(int,input().split())
if a<=b<x:
  if a==0:
    print(1)
  else:
    print(0)
else:
  s=(a-1)//x
  t=b//x
  print(t-s)
a,b,c=map(int,input().split())
mini = 0
m = a % c
if m == 0:
  mini = a/c
else:
  mini = (c-m + a)/c
maxi = 0
M = b % c
if M == 0:
  maxi = b//c
else:
  maxi = (b-M)//c
res = int(maxi) - int(mini) + 1
print(res)
# ABC 048: B – Between a and b ...
a, b, x = map(int, input().split())
print(b // x - (a - 1) // x)
a,b,k = map(int,input().split())
temp =(a - 1 )//k
if a == 0:
  temp = -1
print(b//k - temp)
import math
a, b, x = map(int, input().split())

xa = -(-a // x)
xb = b // x
print(xb - xa + 1)
a,b,x = map(int,input().split())
ans = 0
ad = a//x*x
bd = b//x*x
if ad == a:
  ans += 1
ans += (bd - ad) // x
print(ans)
a,b,x = map(int,input().split())
ansa = 0
  
if a==0:
  ansa=-1
else:
  ansa=(a-1)//x

ansb = b//x

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

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

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

q_b = b//x
q_a = a//x
r_a = a%x
if x==1:
    print(b-a+1)
else:
    if r_a == 0:
        print(q_b-q_a + 1 )
    else:
        print(q_b-q_a)
def sol(x,m):
	if x<=0:
		return 0
	else:
		return x//m

a,b,n = map(int,input().split())
if a==0:
	print(sol(b,n)+1)
# elif a==1:
# 	print(sol(b,n))
else:
	print(sol(b,n)-sol(a-1,n))
a, b, x = map(int, input().split())
print( b//x - (a-1)//x)
a, b, x = map(int, input().split())
ans = b//x - a//x
if a % x == 0:
    ans += 1
print(ans)
a,b,x = map(int,input().split())
print((b//x)-(a//x)+(a%x == 0))
a, b, x = map(int, input().split())
start=a
if (a%x!=0):
    start=a+x-a%x
print(len(range(start, b+1, x)))
a, b, x = map(int,input().split())

ans = b // x - a // x
if (a % x == 0):
  ans += 1
print(ans)
A,B,X = map(int,input().split())
mA, mB = (A-1) // X, B // X
print(mB-mA)
a,b,x=map(int,input().split())

def f_mod(a,x):
  return a//x+1

print(f_mod(b,x)-f_mod(a-1,x))
# -*- coding: utf-8 -*-
"""
Created on Sat May 30 12:02:39 2020

@author: naoki
"""

a,b,x = map(int,input().split()) # 整数a,b及び割る数xを入力
if a!=0:
    print((b//x+1) - ((a-1)//x+1))
else:
    print(b//x + 1)
if __name__ == '__main__':
    # n = int(input())
    a, b, x = map(int, input().split())
    c = b//x - a//x
    if a%x == 0:
        c = c+1
    print(c)
a,b,x = map(int, input().split())
b=b//x + 1
if a!=0:
  a=(a-1)//x + 1
print(b-a)
a, b, x = map(int,input().split())
print(b//x - (a-1)//x)
a,b,x = map(int,input().split())
result = b//x - a//x
if a%x == 0:
	result +=1
    
print(result)
a, b, x = map(int, input().split())
an = a%x
if an != 0:
    an = x - an
if a + an > b:
    ans = 0
else:
    ans = (b-a-an)//x + 1
print(ans)
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)
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())
#a以上b以下でxで割り切れる個数
a_ans=(a-1)//x
b_ans=b//x
print(b_ans-a_ans)
a, b, x = map(int, input().split())

a = -(-a // x) * x
b = (b // x) * x
print(max(0, (b - a) // x + 1))
import math
a,b,x=map(int, input().split())
A=math.ceil(a/x)
B=math.floor(b/x)
print(B-A+1)
a, b, x = map(int, input().split())

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

print(ans)
import sys

numbers = sys.stdin.readline().split(' ')

a = int(numbers[0])
b = int(numbers[1])
c = int(numbers[2])


if a > 0:
    print(b/c - (a-1)/c)
else:
    print(b/c)
import math
a, b, x = map(int, input().split())

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

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

while a <= num <= b and num % x == 0:
    cnt += 1
    num += x
print(cnt)
x, y, z = map(int,input().split())

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

if b % x == 0:
    m += 1

c = b - a

print(m + c // x)
a,b,x = map(int,input().split())
ans = 0
if (b-a)%x==0:
    print((b-a)//x + 1)
elif b-a==0:
    print(0)
else:
    print((b-a)//x)
import sys
import math

numbers = sys.stdin.readline().split(' ')

a = int(numbers[0])
b = int(numbers[1])
c = int(numbers[2])


if a > 0:
    print(int(b//c - (a-1)//c))
else:
    print(math.floor(b//c))
A, B, X = map(int, input().split())

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

print((B//X) - (A//X) + 1)
import math
import sys
import numpy as np
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
# ----------------------------------------
a, b, x = map(int, read().split())
'''
num = b - a + 1
arr = np.linspace(a, b, num)
div = np.where(arr % x == 0)
ans = div[0][0]
'''
if (b < x):
    ans = 0
else:
    if (a == 0):
        ans = b // x - a // x + 1
    else:
        ans = b // x - a // x


print(ans)
a,b,x=map(int,input().split())
k=b-a+1
if a%x!=0 and a!=0:
  k2=x-(a%x)
elif a%x==0 and a!=0:
  k2=0
else:
  k2=1

k-=k2
if k<0:
  print(0)
else:
  print(k//x+1)