import sys read = sys.stdin.buffer.read readline = sys.stdin.buffer.readline readlines = sys.stdin.buffer.readlines A,B = map(int,read().split()) se = set([23,24,25]) se -= set(range(A,B+1)) answer = len(se) print(answer)