X, Y = map(int, input().split()) if X == Y: print(0) elif X == -Y: print(3) elif X == 0: print(2) elif Y == 0: print(1) else: print(-1)