#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #define popcount __builtin_popcount using namespace std; typedef long long int ll; typedef pair P; int main() { int n; cin>>n; int ret; int mx1=1, mx2=n/2+1; for(int i=2; i<=n/2; i++){ cout<<"? "<>ret; if(ret==i){ mx1=i; } } for(int i=n/2+2; i<=n; i++){ cout<<"? "<>ret; if(ret==i){ mx2=i; } } cout<<"? "<>ret; int ans; if(ret==mx1){ if(n/2==1){ cout<<"! "<>ret; if(ret==i) ans=i; } cout<<"? "<>ret; cout<<"! "<>ret; if(ret==i) ans=i; } cout<<"? "<>ret; cout<<"! "<