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