def main(): n = list(map(int, input().split())) #print(n) sample = ["23", "24", "25"] count = 0 for i in range(n[0], n[1] + 1): #print(i) if str(i) in sample: count += 1 print(3 - count) else: print(3) #if if __name__ == '__main__': main()