#include #define rep(i, a, b) for (ll i = (ll)(a); i < (ll)(b); i++) using namespace std; typedef long long ll; int main() { int n; cin >> n; int ans = 0; rep(i, 1, n + 1) { cout << "? " << i << endl; fflush(stdout); int input; cin >> input; if (input == i) ans = i; } cout << "! " << ans << endl; }