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