N = int(input()) import sys for i in range(1,N+1): print("?",i) if int(input()) == i: print("!",i) exit()