print "! ",(0..2000).bsearch{|x|puts "? #{x}","? #{x+1}";gets==gets=="out"}.try &.- 1