a,b=map(int,input().split()) if b==0: print(1) exit() if a+b==0: print(2) exit() else: print(-1)