A, B = map(int,input().split()) pa = [x for x in range(A,B+1) if x in [23,24,25]] print(3-len(pa))