import System.IO main :: IO () main = solve (0, 1000000000) solve :: (Int, Int) -> IO () solve (x, y) = putStrLn ("? " ++ show y') >> hFlush stdout >> getLine >>= judge . (read :: String -> Int) where y' = (x + y) `div` 2 judge n | n == 1 && (y == y' || y - y' == 1) = putStrLn ("! " ++ show y') >> hFlush stdout | n == 1 = solve (y', y) | otherwise = solve (x, y')