a = int(input()) b = int(input()) linear = a * 40 curv = a * 1600 if abs(linear - b) > abs(curv - b): print(2) else: print(1)