Find the number of _palindromic numbers_ among the integers between A and B (inclusive). Here, a palindromic number is a positive integer whose string representation in base 10 (without leading zeros) reads the same forward and backward.
A,B = map(int, input().split())
count = 0
for i in range(1,10):
  for j in range(0,10):
    for k in range(0,10):
      for l in range(0,10):
        for m in range(0,10):
          k = 10000*i + 1000*j +100*k +10*l + m
          if A <= k and k <= B:
            ka = str(k)
            karray = list(map(int, ka))
            if karray[0]==karray[4] and karray[1]==karray[3]:
              count += 1
print(count)
A,B = map(int, input().split())
count = 0
for i in range(A,B+1):
  k = str(i)
  if k[0] == k[4] and k[1] == k[3]:
    count += 1
print(count)
