#  ABC 090: B – Palindromic Numbers

a, b = [int(s) for s in input().split()]

number_of_parindromics = 0



for i in range(a, b + 1):

    if str(i) == str(i)[::-1]:

        number_of_parindromics += 1



print(number_of_parindromics)
# ABC 090: B – Palindromic Numbers

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

nums = 0

for i in range(a, b + 1):

    i_str = str(i)

    nums = nums + 1 if i_str == i_str[::-1] else nums

print(nums)
#  ABC 090: B – Palindromic Numbers
a, b = [int(s) for s in input().split()]
number_of_parindromics = 0
for i in range(a, b + 1):
    if str(i) == str(i)[::-1]:
        number_of_parindromics += 1
print(number_of_parindromics)

# ABC 090: B – Palindromic Numbers
a, b = list(map(int, input().split()))
nums = 0
for i in range(a, b + 1):
    i_str = str(i)
    nums = nums + 1 if i_str == i_str[::-1] else nums
print(nums)

-#  ABC 090: B – Palindromic Numbers -a, b = [int(s) for s in input().split()] -number_of_parindromics = 0 +# ABC 090: B – Palindromic Numbers +a, b = list(map(int, input().split())) +nums = 0 -    if str(i) == str(i)[::-1]: -        number_of_parindromics += 1 -print(number_of_parindromics) +    i_str = str(i) +    nums = nums + 1 if i_str == i_str[::-1] else nums +print(nums)