A, B = map(int, input().split()) tour_day = list(range(A,B+1)) ans = 3 - tour_day.count(23) - tour_day.count(24) - tour_day.count(25) print(ans)