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