fun main(){ val (a, b) = readLine()!!.split(" ").map{it.toInt()} println(if(b==0) 1 else if(a==-1) 2 else -1) }