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