A,B=map(int,input().split()) print(len(set([23,24,25])-set(range(A,B+1))))