import java.util.*; public class Main { public static void main (String[] args) { Scanner sc = new Scanner(System.in); int left = 0; int right = Integer.MAX_VALUE / 2; while (right - left > 1) { int m = (left + right) / 2; System.out.println("? " + m) ; System.out.flush(); int judge = sc.nextInt(); if (judge == 0) { left = m; } else { right = m; } } System.out.println("! " + right); System.out.flush(); } }