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