A, B = int(input()), int(input()) print(1) if B / A < 1000 else print(2)