A = int(input()) B = int(input()) if A * 200000<=B*5000 and (A+1)*200000 > B*5000: print(1) else: print(2)