A, B = map(int,input().split()) print(sum([1 for C in [23,24,25] if not A<=C<=B]))