gx, gy = map(int, input().split()) if gx == gy or gx == - gy: print("1") else: print("2")