def main(): i = input() lst = i.split(' ') A,B = int(lst[0]), int(lst[1]) a = set([23,24,25]) b = set([i for i in range(A,B+1)]) print(len(a-b)) if __name__ == '__main__': main()