#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 4;
bool used[N];
int val[N];
int query(int idx) {
  if (used[idx]) return val[idx];
  used[idx] = 1;
  printf("? %d\n", idx);
  fflush(stdout);
  scanf("%d", &val[idx]);
  return val[idx];
}
void result(int idx) {
  printf("! %d\n", idx);
  exit(0);
}
int main() {
  int n;
  scanf("%d", &n);
  if (n % 4 != 0) {
    printf("! -1\n");
    fflush(stdout);
    return 0;
  }
  int off = n / 2;
  int idx1 = 1, idx2 = n / 2 + 1;
  int x1 = query(idx1), x2 = query(idx2);
  if (x1 == x2) result(idx1);
  if (x1 > x2) {
    swap(x1, x2);
    swap(idx1, idx2);
  }
  int lo = 1, hi = n / 2;
  for (int it = 1; it <= 28; it++) {
    int mid = (hi + lo + 1) / 2;
    int y1 = query(idx1 + mid), y2 = query(idx2 + mid);
    if (y1 == y2) {
      result(idx1 + mid);
    }
    if (y1 > y2) {
      hi = mid - 1;
    } else {
      lo = mid;
    }
  }
  return 0;
}
