A, B = map(int, input().split()) x = B i = 1 if B == 0: print(1) elif A == -1: print(2) else: print(-1)