def ask(x, y): print(f"? {x} {y}", flush=True) return int(input()) n = int(input()) for i in range(1, n, 2): res = ask(i - 1, i) if res == i - 1 or res == i: print(f"! {2 * i - 1 - res}") exit() print(f"! {n - 1}")