A = int(input()) B = int(input()) X = abs(B - A * 40) Y = abs(B - A * 1600) if X < Y: print(1) else: print(2)