Gx = float(input()) Gy = float(input()) if abs(Gx) == abs(Gy): print(1) else: print(2)