from sys import stdin def main(): A, B = map(int, input().split()) print(sum(not A <= i <= B for i in (23, 24, 25))) input = lambda: stdin.readline() main()