a, b = read_line.split.map &.to_i if b == 0 puts 1 elsif a == -1 puts 2 else puts -1 end