from collections import deque def main(x): num = int(x) num_list = [num for i in range(num)] p = deque(num_list) p_ = p.pop() if p_ == num: a_list = [i for i in range(num)] d = deque(a_list) return print('?',0,1) else: try: a=d.popleft() b=d.popleft() if x == a or x == b: if x == a: return print('!',b) else: return print('!',a) else: return print('?',a+2,b+2) except: return print('?',p_-1) if __name__ == "__main__": print(main(input()))