a,b=(int(i) for i in input().split()) x=3 for i in range(a,b+1): if(i>=23 and i<=25): x -=1 print(x)