A = int(input()) B = int(input()) d = B / 200000 - A / 5000 - B / (200000 ** 2) - A / (5000 ** 2) if d < 0: print(1) else: print(2)