a = int(input()) b = int(input()) mx = 5000/a mn = 5000/(a+1) if mn<=200000/b<=mx: print(1) else: print(2)