from collections import deque def main(a,b,x): num = int(x) l.append(num) flg = max(l) % 2 if max(l) == 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('?',max(l)-1) if __name__ == "__main__": l=[] print(main(input()))