# coding utf-8 # contest will be held in 23, 24, 25 s = str(input()) a = int(s.split(" ")[0]) b = int(s.split(" ")[1]) contest = [23, 24, 25] days = 3 for x in contest: if a <= x and x <= b: days -= 1 print(days)