N=int(input()) #print(N) C=0 if C==0: J=[i+1 for i in range(N)] #print(len(J),J[0],J[-1]) for i in range(10): W=[] if len(J)%2==1: W.append(J[-1]) for j in range(len(J)//2): #print(W,J) print("?",J[j*2],J[j*2+1],flush=True) n=int(input()) W.append(n) #print("i",i,J,W) if len(W)==1: C=W[0] break else: J=W if C!=0: #print(C) J=[] for i in range(1,N+1): if i==C: pass else: J.append(i) for i in range(10): W=[] if len(J)%2==1: W.append(J[-1]) for j in range(len(J)//2): print("?",J[j*2],J[j*2+1],flush=True) n=int(input()) W.append(n) #print("I",J,W) if len(W)==1: print("!",W[0],flush=True) exit() else: J=W