def main(): A = int(input()) B = int(input()) linear_rate = 5000*B / (200000*A) square_rate = B * 5000**2 / (A * 200000**2) if abs(linear_rate - 1) < abs(square_rate - 1): print(1) else: print(2) if __name__ == "__main__": main()