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