#include int main(void) { int ans, result; printf("? 100\n"); fflush(stdout); scanf("%d", &ans); if(ans == 0) { result = 100; } else if(ans == -1) { int i = 1; do { printf("? 0\n"); fflush(stdout); scanf("%d", &ans); i++; } while(ans != 0); result = i - 1; } else { int l = 101, r = 1000000000, m = (l + r) / 2, i = 1; while(1) { printf("? %d\n", m - i); fflush(stdout); scanf("%d", &ans); if(ans == 0) { result = m; break; } if(ans == +1) { l = m + 1; } if(ans == -1) { r = m - 1; } m = (l + r) / 2; i++; } } printf("! %d\n", result); fflush(stdout); return 0; }