peterverebics/CodeNet_Python_118 huggingface dataset:
K, S = map(int, input().split())

ways = 0
for i in range(K+1):
    for j in range(K+1):
        k = S - i - j
        if k >= 0 and k <= 2*K:
            ways += 1

print(ways)
k, s = map(int, input().split())
count = 0
for i in range(k+1):
    rem = s - i
    for j in range(rem+2):
        y, z = j, rem-j
        if y <= 5 and z <= 5:
            if s == y+z+i:
                count += 1
print(count)
k,s = map(int,input().split())
a = 0
for x in range(k+1):
  for y in range(k+1):
      if s-(x+y) <= k:
        a += 1
        
print(a)
k,s = map(int,input().split())

ans = 0
if(s == 0):
  print(1)
  exit()
elif(s == 3*k):
  print(1)
  exit()
  
for i in range(0,k+1):
  for j in range(0,k+1):
    z = s - i - j
    if(z >= 0 and z >= k):
      ans += 1
        
print(ans)
k, s = map(int,input().split(' '))
count = 0
for x in range(2,k+1):
    for y in range(2,k+1):
        if x + y > s:
            continue
        for z in range(2,k+1):
            if x + y + z == s:
                count += 1
print(count)
k, s = map(int, input().split())
cnt = 0
for x in range(k+1):
    if x == k:
        cnt += 1
        continue
    for y in range(k-x+1):
        if x+y == s:
            cnt += 1
            break
        for z in range(k-x-y+1):
            if x+y+z == s:
                cnt += 1
                break
print(cnt)
K, S = map(int, input().split())
ans = 0

for x in range(K+1):
    for y in range(K+1):
        if S - K == x + y:
            ans += 1

print(ans)
K,S = list(map(int, input().split()))
ans = 0
for X in range(K+1):
  for Y in range(min(K+1,S-X+1)):
    for Z in range(S-X-Y,S-X-Y+1):
      if X+Y+Z == S:
        ans = ans + 1
        
print(ans)
k, s = map(int, input().split())

ans = 0
for x in range(k+1)[::-1]:
    y = max(0, min(s-x, k))
    z = s-x-y
    if z > k or z < 0:
        break
    ans += y - z + 1

print(ans)
K , S = map(int , input().split())
ans = 0

for x in range(K):
    for y in range(K):
        if x + y + (S-(x+y)) == S:
            ans += 1
ans += ans/2
print(int(ans))
k,s=map(int,input().split())
ans = 0
for x in range(k+1):
    for y in range(k+1):
        z = s - x -y
        if z<0 or k<z:
            break
        else:
            ans +=1
        
print(ans)
k, s = map(int, input().split())
count = 0
temp = s-2*k if (s-2*k)>0 else 0
for x in range(temp, k+1):
    for y in range(x+1, k+1):
        for z in range(y+2, k+1):
            if x+y+z == s:
                count += 6
    for z in range(temp, k+1):
        if x*2 + z == s:
            if x == z:
                count += 1
            else:
                count += 3
print(count)
K, S = map(int, input().split())

ans = 0
for x in range(K+1):
  for y in range(K+1):
    if S-x-y <= K: ans += 1
    
print(ans)
K,S = map(int,input().split())
count = 0
for i in range(K+1):
    for j in range(K+1-i):
        for k in range(K+1-i-j):
            if i+j+k == S:
                count+=1
print(count)
result = 0
k, s = map(int, input().split())
for i in range(s + 1):
  for j in range(s - i + 1):
    if i + j + (s - i - j) <= s:
      result += 1
print(result)
# vim: fileencoding=utf-8


def main():
    k, s = map(int, input().split())
    c = 0
    for i in range(k + 1):
        for j in range(k + 1):
            z = s - i - j
            if z > 0 and z <= k:
                c += 1
    print(c)


if __name__ == "__main__":
    main()
K, S = map(int, input().split())

count = 0
for x in range(K+1):
    if S-x<=2*K and S-x>=0:
        for y in range(K+1):
            if S-x-y<=K and S-x-y>=0:
                print(x, y)
                count += 1
#                 for z in range(K+1):
#                     if x+y+z==S:
#                         count += 1
print(count)
k,s=map(int,input().split())
ret=0
for i in range(k):
  for j in range(k):
    if 0<=(i+j)<=s:
      ret+=1
print(ret)
k, s = map(int, input().split())
# init (x<=y<=z)
if k<s:
    z=k
    if k<s-z:
        y=k
        x = s-2*k
    else:
        y=s-z
        x=0
else:
    z=s
    x,y = 0, 0
print(len(sum([[None for j in range(z-x-i+1)] for i in range(z-y+1)], [])))
k, s = map(int, input().split())

ans = 0
for x in range(k + 1):
    for y in range(k + 1):
        z = s - (x + y)
        if z <= k:
            ans += 1

print(ans)
k, s = map(int, input().split())
ans = 0
for x in range(k):
    for y in range(k):
        z = s-x-y
        if k >= z >= 0:
            ans += 1
print(ans)
k,s = map(int, input().split())

ans = 0
for x in range(k+1):
  for y in range(k+1):
    if 0 <= s-x-y <= k:
      ans += k+x+y-s+1
      break


print(ans)
k, s = list(map(int, input().split()))

minz = max(0, s-2*k)
maxz = k

def f(s, k):
    if k >= s:
        return (s+1)
    else:
        return (2*k-s)+1

ans = 0
for i in range(minz, maxz+1):
    ans += f(s-i, k)

print(ans)
K, S = map(int, input().split())

ans = 0
for x in range(K+1):
  for y in range(K+1-x):
    z = K - x - y
    if x + y + z == S:
      ans += 1
print(ans)
k,s = map(int,input().split())
ans = 0
if s>3*k:
    print(0)
elif s==3*k:
    print(1)
else:
    for i in range(k+1):
        for j in range(k+1):
            if s-k<=i+j<=s: 
                ans += 1
print(ans)
a,b=map(int,input().split())
c=0
for x in range(a+1):
    for y in range(a+1):
        if b-x-y>=0:c+=1
print(c)
K,S = map(int, input().split())
ans = 0

for x in range(K+1):
    for y in range(K+1):
        print(S-x-y)
        if 0 <= S-x-y <= K:
            ans += 1

print(ans)
K,S=map(int,input().split())
ans=0
for i in range(S):
    for j in range(S-i):
        for k in range(S-i-j):
            if i+j+k<=K:
                ans+=1
print(ans)
k, s = map(int, input().split())
cnt = 0
for x in range(k + 1):
    for y in range(max(0,s // 3 - x), k + 1):
        for z in range(max(0,s - x - y), k + 1):
            if x + y + z == s:
                cnt += 1
                break
            else:
                continue
print(cnt)
input_str = input().split()
k = int(input_str[0])
s = int(input_str[1])
print(k)
print(s)

count = 0
for x in range(k+1):
  for y in range(k+1-x):
      for z in range(k+1-x-y):
        if x+y+z == s:
          count += 1
print(count)
k, s = map(int, input().split())

if k * 3 < s:
    print(0)
else:
    r = k * 3 - s
    r = min(k, r, s)
    ans = (r + 2) * (r + 1) // 2

print(ans)
K, S = map(int, input().split())
cnt = 0
from itertools import combinations_with_replacement as cmbr
for x, y in cmbr(range(K+1),2):
    if 0 <= S-x-y <= K:
        cnt += 1
print(cnt)
i,j=map(int,input().split())
a=0
for x in range(i+1):
  for y in range(i+1):
    if j-(x+y)<=i:
      a+=1
print(a)
k ,s = map(int, input().split())

count = 0
for x in range(min(k+1,s + 1)):
    for y in range(x,min(x+k+1,s +1)):
                
        count += 1
print(count)
k,s=map(int,input().split())
print(abs(s-3*k+2)*abs(s-3*k+1)//2)
K, S = map(int, (input().split()))

ans = 0

for x in range(0, K + 1):
    for y in range(0, K + 1):

        z = S - x - y
        if z <= K:
            ans += 1

print(ans)
k,s=map(int,input().split())
count=0
for i in range(0,k+1):
	for k in range(0,k+1):
		if s-i-k>=0:
			count+=1
print(count)
k,s = map(int,input().split())
start = s//3
ans = 0
for i in range(start,k+1):
    for j in range(start,k+1):
        for l in range(start,k+1):
            if i+j+l == s:
                ans += 1
print(ans)
def main():
    S, K = map(int, input().split())
    ans = 0
    for X in range(K+1):
        Y_min = max(0, S-X-K)
        Y_max = min(K, S-X)
        ans += max(0, Y_max - Y_min + 1)
    print(ans)
if __name__ == "__main__":
    main()
import sys
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
read = sys.stdin.buffer.read
sys.setrecursionlimit(10 ** 7)

K, S = map(int, readline().split())

ans = 0
for X in range(0, K + 1):
    for Y in range(0, K + 1):
        Z = S - X - Y
        if Z <= K:
            ans += 1
print(ans)
k, s = map(int, input().split())
cnt = 0
for i in range(k+1):
    for j in range(k+1):
        c = s - (i + j)
        if c >= 0 and s == i + j + c:
            cnt += 1

print(cnt)
from sys import stdin

[K, S] =  [int(x) for x in (stdin.readline().rstrip().split())]

# combination of given X, Y, Z, that satisfy
# 0<= X, Y, Z <= K
# 0<= S <=3K
# X+Y+Z = S
# 2<= K<=2500

count = 0

for i in range(K+1):
    for j in range(K+1):
        if i+j<=S:
            count+=1

print(count)
k ,s = map(int, input().split())

count = 0
for x in range(k+1):
    for y in range(x,x+k+1):
        for z in range(y,y+k+1):
            print(x,y,z)
            if x + y + z == s:
                
                count += 1
print(count)
def f(K, S):
    z = list(range(0,K+1))
    answer = []

    for i in z:
      s_z = S - i
      if K < s_z:
        if (K + 1) > (s_z - K):
          answer.append(K + 1 - (s_z - K))

      else:
          answer.append(s_z + 1)

    return sum(answer)
k,s = map(int,input().split())
ans = 0
for x in range(1,k+1):
    for y in range(1,k+1):
        if s-x-y>=0 and s-x-y<=k:
            ans += 1
print(ans)
K = 2
S = 2
count = 0

for x in range(K+1):
  for y in range(K+1):
    z = S - x - y
    if 0 <= z and z <= K:
    	count += 1
        
print(count)
r,g=map(int,input().split())
X=0
for i in range(g+1):
  for j in range(g+1):
    k=g-i-j
    if k>=0 and k<=g:
      X+=1
print(X)
K, S = map(int, input().split())

cnt = 0
for x in range(K):
  for y in range(K):
    z = S-x-y
    if 0 <= z and z <= K:
      cnt+=1

print(cnt)
k,s = map(int,input().split())
ans = 0
for x in range(k+1):
    for y in range(k+1):
        z = s -(x+y)
        if 0 <= z <= k:
            ans += 1
            print(x,y,z)
print(ans)
k,s = map(int,input().split())

a = min(k,s)

ans = 0
for x in range(a+1):
  for y in range(a+1):
    if s - x - y >= 0:
      ans+= 1

print(ans)
k, s = map(int, input().split())
ans = 0

for x in range(k+1):
    for y in range(x+1, k+1):
        z = s - x - y
        l = {x, y, z}
        if y < z <= k:
            ans += 6

for x in range(k+1):
    y = x
    z = s - x - y
    if z != x and z >= 0:
        ans += 3

if s % 3 == 0:
    ans += 1

print(ans)
K,S = map(int, input().split())

ans = 0

for X in range(K+1):
	S1 = S - X
	if S1 < 0:
		break
	else:
		if S1 <= K:
			ans += S1 + 1
		elif S1 <= 2 * K:
			ans += S1 - 2*K + 1
		else:
			continue

print(ans)
k,s = map(int,input().split())
count = 0
for i in range(k+1):
    for j in range(k+1):
        l = s-(i+j)
        print(i,j,l)
        if i+j+l == s and l >= 0 and l <= k and i <= k and j <= k:
            #print("解：",i,j,l)
            count += 1
print(count)
k, s = map(int, input().split())
i = 0
x = 0
for x in range(0,k+1):
    for y in range(0,k+1):
        if x <= k & y <= k & s-x-y <= k & x+y <= s: i += 1 
#            if x+y+z == s: i += 1
print(i)
k, s = map(int, input().split())
p = 0
for x in range(0,k+1):
  for y in range(0,k+1):
    for z in range(0,k+1):
      if (x+y+z) == s:
        p+=1
      if (x+y+z) >= s:
        break
    if (x+y+z) >= s:
      break
print(p)
K, S = map(int, input().split())
count = 0
for x in range(K+1):
  for y in range(1,K+1):
    for z in range(1,K+1):
      if x + y + z == S:
        count = count + 1
print(count)
k,s=map(int,input().split())
ans=0

for i in range(k+1):
    for j in range(k+1):
        for l in range(k+1):
            if i+j+k==s:
                ans+=1

print(ans)
k, s = list(map(int, input().split()))

x = k - max(0,s-2*k) + 1

print(x*(x+1)//2)
k,s=map(int,input().split())
count=0
for x in range(k+1):
  for y in range(k+1):
      if s-x-y>=0:
        count+=1
print(count)
k, s = map(int, input().split())
ans = 0
if s <= k:
    ans = (s+2)*(s+1)/2
else:
    for i in range(k+1):
        for j in range(k+1):
            ans = ans + (0 <= s-i-j <= k)

print(ans)
K, S = [int(i) for i in input().split()]
ans = 0
for i in range(K+1):
    for j in range(i, K+1):
        if S-i-j <= K:
            ans += 1
print(ans)
k,s = map(int, input().split())

l = 0

if s <= k:
  l = int((k+2)*(k+1)/2)
else:
  for x in range(0,k+1):
    if s-x > 2*k:
      l += 0
    elif k < s-x <= 2*k:
      l += 2*k - s + x + 1
    elif s-x <= k:
      l += s-x+1      
print(l)
[K, S] = list(map(int, input().split()))
count = 0
total = 0
flag = False
for X in range(K, -1, -1):
  for Y in range(K, -1, -1):
    Z = S - X - Y
    if 0 <= Z and Z <= K:
      count +=1
    if K < Z:
      flag = True
  if flag:
    break
        
print(count)
K,S=map(int,input().split())

ans=0

for i in range(K+1):
  for j in range(K+1):
    for k in range(K+1):
      if i + j + k==S:
        ans+=1
k,s = map(int,input().split())
x = 0
for d in range(0,k+1):
    for y in range(0,k+1):
        z = s - d - y
        if x+y+z == s and z<k+1 and z>=0:
            x = x+1
print (x)
k, s = [int(x) for x in input().split()]
cnt = 0
for x in range(k + 1):
    for y in range(x, k + 1):
        for z in range(y, k + 1):
            if x + y + z == s:
                if x == y == z:
                    cnt += 1
                elif x == y or y == z:
                    cnt += 3
                else:
                    cnt += 3
print(cnt)
if __name__ == '__main__':
    b, c = map(int, input().split())
    num = b*3 -c
    if num == 0:
        num =1
    else:
        if num > b:
            num = b*3
        else:
            num = b *3
    print(num)
k, s = map(int, input().split())

c = 0
for x in range(k+1):
    for y in range(k+1):
        if s-(x+y) <= k:
            c += 1
            
print(c)
k,s = map(int,input().split())
cnt=0
for i in range(s+1):
    for j in range(s+1):
        if i+j<=s:
            cnt+=1
print(cnt)
k, s = map(int, input().split())

pat = 0
for x in range(k+1):
    for y in range(k+1):
            if s >= x + y and k >= x + y :
                pat += 1
print(pat)
#coding: utf-8
K,S=map(int,input().split(" "))
answer=0
for X in range(K+1):
  for Y in range(K+1):
    if S-(X+Y)<=K:
      answer+=1
print(answer)
K, S = [int(x) for x in input().split()]
ans = 0
for x in range(K+1):
    for y in range(K+1):
        a = S-x-y
        if a <= K:
            ans +=1
print(ans)
k,s = map(int,input().split())
count = 0
for l in range(k+1):
    for m in range(k+1-l):
        for n in range(k+1-l-m):
            if l + m + n == s:
                count += 1
print(count)
K, S = map(int, input().split())
count = 0
for x in range(K + 1):
  for y in range(K + 1):
    if S - x - y <= K:
      count += 1
print(count)
def actual(K, S):
    my_range = lambda n: range(n + 1)

    count = 0

    for x in my_range(K):
        for y in my_range(K):
            z = S - (x + y)

            if z >= 0:
                count += 1

    return count

  
K, S = map(int, input().split())

print(actual(K, S))
# coding: utf-8
# Your code here!

k, s = map(int, input().split())

cnt = 0

for i in range(k+1):
    for j in range(k+1):
        if s-i-j <= k:
            cnt += 1

print(cnt)
k, s = map(int,input().split())
ans = 0

for x in range(k+1):
  for y in range(k+1):
    if s-x-y <= k:
        ans += 1

print(ans)
K,S= map(int, input().split())

number_lis = []
ans = 0

for i in range(0,K+1):
    number_lis.append(i)

for j in number_lis:
    for k in number_lis:
        for l in number_lis:
            if 0<= (S - (j + k)) <=K:
                ans = ans + 1
                
print(ans)
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)

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

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

ans = (b - aa) // x + 1

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

# 0~a-1でいくつあるか
if a == 0:
    count_a = 0
else:
    count_a = (a-1) // x + 1


# 0~bでいくつあるか
count_b = b // x + 1

print(count_b - count_a)
a,b,x = map(int, input().split())
print(b//x - (a-1)//x)
#import itertools
#import fractions
#import numpy as np
#mod = 10**4 + 7
"""def kiri(n,m):
  r_ = n / m
  if (r_ - (n // m)) > 0:
    return (n//m) + 1
  else:
    return (n//m)"""

# Written by NoKnowledgeGG @YlePhan

#import math
#mod = 10**9+7

def main():
  a,b,x = map(int,input().split())
  print(b//x - (a-1)//x)
if __name__ == '__main__':
  main()
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))
import sys
readline = sys.stdin.readline

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

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

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

if a % x == 0:
    ans = max_div - min_div + 1
else:
    ans = max_div - min_div
    
print(ans)
#!/usr/local/bin python
# -*- coding: utf-8 -*-
#
# ~/PycharmProjects/atcoder/B-BetweenAandB.py
#

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

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

readline = sys.stdin.readline
readlines = sys.stdin.readlines
ns = lambda: readline().rstrip() # input string
ni = lambda: int(readline().rstrip()) # input int
nm = lambda: map(int, readline().split()) # input multiple int 
nl = lambda: list(map(int, readline().split())) # input multiple int to list

a, b, x = nm()
d_min = x - (a % x)
if d_min == x: 
    d_min = 0
d_max = b % x
min = a + d_min
max = b - d_max
if min > max: 
    ans = 0
else:
    ans = ((max - min) // x + 1)
print(ans)
A, B, X = map(int, input().split())

def f(N):
    return N // X

print(f(B) - f(A - 1))
a,b,x=map(int,input().split())
print(b//x-(a-1)//x if a>0 else b//x+1)
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(' '))
answer = b//x - (a-1)//x
print(answer)
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)
a, b, x = map(int, input().split())

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

if a % x == 0:
  if b % x == 0:
    print(b // x - a // x + 1)
  else:
    print(b // x - a // x + 1)
else:
  if b % x == 0:
    print(b // x - a // x)
  else:
    print(b // x - a // x)
a,b,x = map(int,input().split())
if a==0 and b==0:
    print(1)
elif a == 0:
    print(b//x+1)
else:
    print(b//x - (a-1)//x)
import numpy as np
import math
import sys
def sinput(): return sys.stdin.readline()
def iinput(): return int(sinput())
def imap(): return map(int, sinput().split())
def fmap(): return map(float, sinput().split())
def iarr(): return list(imap())
def farr(): return list(fmap())
def sarr(): return sinput().split()

a, b, x = imap()
ans = (b//x) - (a//x)
if a % x == 0: ans += 1
print(ans)
(a,b,x) = map(int,input().split())
if a==0:
    print(int(b//x)+1)
else:
    print(int(b//x)-int((a-1)//x))
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)
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))
A, B, x = map(int,input().split())
b_d = B//x+1
a_d = A//x
if A!=0 and A%x!=0:
   a_d+=1
print(b_d - a_d)
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)
a,b,x=map(int,input().split())
ax=(a-1)//x
bx=b//x
print(bx-ax)
a,b,x = map(int,input().split())

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

print(B - A)
a,b,x=map(int,input().split())

ap=a//x
bp=b//x

ans=bp-ap
if a%x==0:
  ans+=1

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

# ans = 0
bx = b//x + 1
ax = (a-1)//x + 1
ans = bx - ax
print(ans)
a,b,x=map(int,input().split())
if a==0:
  print(b//x+1)
else:
  print((b//x)-((a-1)//x))
def main():
    a, b, x = map( int, input().split())
    print(b//x - (a-1)//x)
if __name__ == '__main__':
    main()
a,b,x=map(int,input().split())
print(b//x-(a-1)//x)
a,b,x=map(int,input().split())

if a==0:
    fl=-1
else:
    fl=(a-1)//x

cl=b//x

print(cl-fl)
a, b, x = map(int, input().split())
print((b // x) - ((a - 1) // x))
a,b,x = map(int, input().split())
print(b//x - a//x + (a%x == 0))
a, b, x = map(int, input().split())
print(b // x - (a - 1) // x)
def main():
    import sys
    input = sys.stdin.readline
    sys.setrecursionlimit(10**7)
    from collections import Counter, deque
    #from collections import defaultdict
    from itertools import combinations, permutations, accumulate, groupby
    #from itertools import product
    from bisect import bisect_left,bisect_right
    from heapq import heapify, heappop, heappush
    from math import floor, ceil
    #from operator import itemgetter

    #inf = 10**17
    #mod = 10**9 + 7

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

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

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

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

ans = b // x - (a - 1) // x
print(ans)
abx = input().split()
a, b, x = int(abx[0]), int(abx[1]), int(abx[2])
print(int(b//x) - int((a-1)//x))
a,b,x = map(int,input().split())

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

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

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

print(b//x - (a-1)//x)
def main():
    
    end, start, divisor = [int(i) for i in input().split()]
    a = start//divisor - (end-1)//divisor

    print(a)

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

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

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

down = a//x
if down*x == a:
  down -= 1

up = b//x
#print(up,down)
print(up - down)
a, b, x = list(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())

# a,b,x = map(int, "9 9 2".split())
cnt=0

alfa = b//x + 1
beta = (a-1)//x + 1

print(alfa - beta)