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