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