a,b = map(int,input().split()) line = [23,24,25] count = 3 for i in line: if a <= i <= b: count -= 1 if count == 0: break print(count)