A = int(input()) B = int(input()) X1, X2 = A * 40, A * 1600 if abs(X1 - B) < abs(X2 - B): print(1) else: print(2)