a = int(input().rstrip()) b = int(input().rstrip()) n1 = 200000 / 5000 n2 = n1 * n1 if abs(b - a*n1) < abs(b - a*n2): print("1") else: print("2")