import sys input = lambda :sys.stdin.readline()[:-1] ni = lambda :int(input()) na = lambda :list(map(int,input().split())) yes = lambda :print("yes");Yes = lambda :print("Yes");YES = lambda : print("YES") no = lambda :print("no");No = lambda :print("No");NO = lambda : print("NO") ####################################################################### n = ni() for i in range(n//2): x = i * 2 y = (i*2+1)%n print("?", x, y, flush=True) z = ni() if z == x: print("!", y, flush=True) exit() if z == y: print("!", x, flush = True) exit()