a = int(input()) b = int(input()) if (b+1) /a > 40: print(1) else: print(2)