N = int(input()) q = N // 2 for i in range(q): a = i * 2 b = i * 2 + 1 print("?",a,b,flush=True) z = int(input()) if a == z: print("!",a,flush=True) exit() if b == z: print("1",b,flush=True) print("!",N-1,flush=True) exit()