import sys input = sys.stdin.readline N=int(input()) for i in range(0,N,2): print("?",i,j,hlush=True) x=int(input()) if x==i: print("!",j,flush=True) break elif y==j: print("!",i,flush=True) break else: print("!",N-1,flush=True)