A, B = map(int, input().split()) rrrrr = 3 for i in range (A,B + 1): if 23 <= i <= 25: rrrrr -= 1 print(rrrrr)