A,B=map(int,input().split())
ANS={23,24,25}

for i in range(A,B+1):
    ANS.discard(i)

print(len(ANS))