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