L, R = map(int, input().split())
M = R - L + 1
count = 0
list_1 = []
for i in range(0, M):
list_1.append(L)
L = L + 1
list_2 = list(map(str, list_1))
num_str = "".join(list_2)
for j in range(len(num_str)):
if num_str[j] == '2':
count =count + 1
print(count)
将L到R的数列存到列表内,转换成字符串连接起来,遍历字符串,找到2计数