a, b = map(int, input().split()) ans = 3 for d in [23, 24, 25]: if a <= d <= b: ans -= 1 print(ans)