N = int(input()) for i in range(N//2): a,b = 2*i, 2*i+1 print('?',a,b) c = int(input()) if a == c: print('!',b) exit() if b == c: print('!',a) exit() print('!',N-1) exit()