a = int(input()) b = int(input()) ratio = b / a r1 = ratio / 40 r2 = ratio / 1600 if abs(1 - r1) < abs(1 - r2): print(1) else: print(2)