A = gets.to_i B = gets.to_i if A == 1 if B == 0 puts 1 exit else puts -1 exit end end puts -B / (A - 1)