l = input().split() for i in range(len(l)): l[i] = int(l[i]) counter = 0 if(l[0]<=23 and l[1]>=23): pass else: counter += 1 if(l[0]<=24 and l[1]>=24): pass else: counter += 1 if(l[0]<=25 and l[1]>=25): pass else: counter += 1 print(counter)