x, y = input().split(' ') if x == y or x == (-1)*y: print(1) else: print(2)