func_code_string:    // Problem: A. Searching Local Minimum   // Contest: Codeforces - Codeforces Round #700 (Div. 1)   // URL: https://codeforces.com/contest/1479/problem/A   // Memory Limit: 512 MB   // Time Limit: 2000 ms   // Powered by CP Editor (https://github.com/cpeditor/cpeditor)      #include <iostream>   #include <iosfwd>   #include <iomanip>   #include <cstdio>   #include <cstring>   #include <cstdlib>   #include <ctime>   #include <cmath>   #include <cassert>   #include <cctype>   #include <climits>   #include <vector>   #include <bitset>   #include <set>   #include <queue>   #include <math.h>   #include <stack>   #include <map>   #include <deque>   #include <string>   #include <list>   #include <iterator>   #include <sstream>   #include <complex>   #include <fstream>   #include <functional>   #include <numeric>   #include <utility>   #include <algorithm>   #include <assert.h>   #include <unordered_map>   #pragma GCC optimize ( -O3 )      using namespace std;      #define watch(x) cout << (#x) <<   =   << (x) << endl   #define PI double(2 * acos(0.0))   #define LL long long   #define MOD 1000000007   #define all(x) (x).begin(), (x).end()   #define INF 1e15   int query(int a, int n){         if(a == 0 || a == n + 1){               return 1e7;         }         cout <<  ?   << a << endl;         int p;         cin >> p;         return p;   }   int helper(int a, int n){         int left = a - 1;         int right = a + 1;         int mid = a;         int p = query(left, n);         int q = query(mid, n);         int r = query(right, n);         if(p > q && q < r){               return 0;         }         if(p < q){               return 2;         }         else{               return 1;         }   }   int main() {         int n;         cin >> n;         int start = 1;         int end = n;         int ans = -1;         while(start <= end){               int mid = (start + end) / 2;               int p = helper(mid, n);               if(p == 0){                     ans = mid;                     break;               }               if(p == 1){                     start = mid + 1;               }else{                     end = mid - 1;               }         }         cout <<  !   << ans << endl;   }                                                                                                                        