A = int(input()) B = int(input()) N = 40 * A NN = 1600 * A if abs(N - B) > abs(NN - B): print(2) else: print(1)