package main; import java.util.Scanner; public class Main { public static void main(String[] args) throws Exception { Scanner sc = new Scanner(System.in); long max = 1000000000; long min = 1; for (int i = 0; i < 100; i++) { long num = (min + max) / 2; System.out.print("? " + num); if (sc.nextInt() == 1) { min = num; } else { max = num; } if(min == max){ System.out.println("! " + max); } } } }