Problem: The only difference between the easy and the hard version is the limit to the number of queries.

This is an interactive problem.

There is an array a of n different numbers. In one query you can ask the position of the second maximum element in a subsegment a[l..r]. Find the position of the maximum element in the array in no more than 20 queries.

A subsegment a[l..r] is all the elements a_l, a_{l + 1}, ..., a_r. After asking this subsegment you will be given the position of the second maximum from this subsegment in the whole array.

Input

The first line contains a single integer n (2 ≤ n ≤ 10^5) — the number of elements in the array.

Interaction

You can ask queries by printing "? l r" (1 ≤ l < r ≤ n). The answer is the index of the second maximum of all elements a_l, a_{l + 1}, ..., a_r. Array a is fixed beforehand and can't be changed in time of interaction.

You can output the answer by printing "! p", where p is the index of the maximum element in the array.

You can ask no more than 20 queries. Printing the answer doesn't count as a query.

After printing a query do not forget to output end of line and flush the output. Otherwise, you will get Idleness limit exceeded. To do this, use:

  * fflush(stdout) or cout.flush() in C++; 
  * System.out.flush() in Java; 
  * flush(output) in Pascal; 
  * stdout.flush() in Python; 
  * see documentation for other languages 



Hacks

To make a hack, use the following test format.

In the first line output a single integer n (2 ≤ n ≤ 10^5). In the second line output a permutation of n integers 1 to n. The position of n in the permutation is the position of the maximum

Example

Input


5

3

4



Output


? 1 5

? 4 5

! 1

Note

In the sample suppose a is [5, 1, 4, 2, 3]. So after asking the [1..5] subsegment 4 is second to max value, and it's position is 3. After asking the [4..5] subsegment 2 is second to max value and it's position in the whole array is 4.

Note that there are other arrays a that would produce the same interaction, and the answer for them might be different. Example output is given in purpose of understanding the interaction.

Solution (in JAVA):

Solution:
import java.io.*;
import java.util.*;

public class Main {
    static PrintWriter pw;
    static Scanner sc;
    static long ceildiv(long x, long y) { return (x+y-1)/y; }
    static int mod(long x, int m) { return (int)((x%m+m)%m); }
    static void put(HashMap<Integer, Integer> map, Integer p){if(map.containsKey(p)) map.replace(p, map.get(p)+1); else map.put(p, 1); }
    static void rem(TreeMap<Integer, Integer> map, Integer p){ if(map.get(p)==1) map.remove(p);else map.replace(p, map.get(p)-1); }
    static void printf(double x, int dig){ String s="%."+dig+"f"; pw.printf(s, x); }
    static int Int(boolean x){ return x?1:0; }
    static final int inf=(int)1e9, mod=998244353;
    static final long infL=inf*1l*inf;
    static final double eps=1e-9;
    public static long gcd(long x, long y) { return y==0? x: gcd(y, x%y); }
    public static void main(String[] args) throws Exception {
        sc = new Scanner(System.in);
        pw = new PrintWriter(System.out);
//        int t = sc.nextInt();
//        while (t-- > 0)
            testcase();
        pw.close();
    }
    static int ask(int l, int r) throws IOException{
        pw.println("? "+(l+1)+ " "+(r+1));
        pw.flush();
        return sc.nextInt()-1;
    }
    static void testcase() throws IOException {
        int n=sc.nextInt();
        int x=ask(0, n-1), y=x==0? -1: ask(0, x);
        if(y==x){
            int st=1, end=x-1;
            int ans=0;
            while(st<=end){
                int mid=(st+end)/2;
                if(ask(mid, x)==x){
                    ans=mid;
                    st=mid+1;
                }else{
                    end=mid-1;
                }
            }
            out(ans);
        }else{
            int st=x+1, end=n-1;
            int ans=n-1;
            while(st<=end){
                int mid=(st+end)/2;
                if(ask(x, mid)==x){
                    ans=mid;
                    end=mid-1;
                }else{
                    st=mid+1;
                }
            }
            out(ans);
        }
    }
    static void out(int x){
        pw.println("! "+(x+1));
    }
    static void printArr(int[] arr) {
        for (int i = 0; i < arr.length; i++)
            pw.print(arr[i] + " ");
        pw.println();
    }
    static void printArr(long[] arr) {
        for (int i = 0; i < arr.length; i++)
            pw.print(arr[i] + " ");
        pw.println();
    }
    static void printArr(double[] arr) {
        for (int i = 0; i < arr.length; i++)
            pw.print(arr[i] + " ");
        pw.println();
    }
    static void printArr(Integer[] arr) {
        for (int i = 0; i < arr.length; i++)
            pw.print(arr[i] + " ");
        pw.println();
    }
    static void printArr(ArrayList list) {
        for (int i = 0; i < list.size(); i++)
            pw.print(list.get(i)+" ");
        pw.println();
    }
    static void printArr(boolean[] arr) {
        StringBuilder sb=new StringBuilder();
        for(boolean b: arr)
            sb.append(Int(b));
        pw.println(sb);
    }
    static class Scanner {
        StringTokenizer st;
        BufferedReader br;
        public Scanner(InputStream s) {
            br = new BufferedReader(new InputStreamReader(s));
        }

        public Scanner(FileReader r) {
            br = new BufferedReader(r);
        }

        public String next() throws IOException {
            while (st == null || !st.hasMoreTokens())
                st = new StringTokenizer(br.readLine());
            return st.nextToken();
        }

        public int nextInt() throws IOException {
            return Integer.parseInt(next());
        }

        public long nextLong() throws IOException {
            return Long.parseLong(next());
        }

        public String nextLine() throws IOException {
            return br.readLine();
        }

        public double nextDouble() throws IOException {
            return Double.parseDouble(next());
        }
        public int[] nextDigits() throws IOException{
            String s=nextLine();
            int[] arr=new int[s.length()];
            for(int i=0; i<arr.length; i++)
                arr[i]=s.charAt(i)-'0';
            return arr;
        }
        public int[] nextArr(int n) throws IOException {
            int[] arr = new int[n];
            for (int i = 0; i < arr.length; i++)
                arr[i] = nextInt();
            return arr;
        }
        public Integer[] nextsort(int n) throws IOException{
            Integer[] arr=new Integer[n];
            for(int i=0; i<n; i++)
                arr[i]=nextInt();
            return arr;
        }
        public Pair nextPair() throws IOException{
            return new Pair(nextInt(), nextInt());
        }
        public long[] nextLongArr(int n) throws IOException{
            long[] arr=new long[n];
            for (int i = 0; i < n; i++)
                arr[i]=sc.nextLong();
            return arr;
        }
        public Pair[] nextPairArr(int n) throws IOException{
            Pair[] arr=new Pair[n];
            for(int i=0; i<n; i++)
                arr[i]=nextPair();
            return arr;
        }
        public boolean ready() throws IOException {
            return br.ready();
        }
    }
    static class Pair implements Comparable<Pair>{
        int x;
        int y;
        public Pair(int x, int y) {
            this.x=x;
            this.y=y;
        }
        public boolean contains(int a){
            return x==a || y==a;
        }
        public int hashCode() {
            return (this.x*1000000000+this.y);
        }
        public int compareTo(Pair p){
            if(x==p.x)
                return y-p.y;
            return x-p.x;
        }
        public boolean equals(Object obj) {
            if (obj == null) {
                return false;
            }
            if (this.getClass() != obj.getClass()) {
                return false;
            }
            Pair p = (Pair) obj;
            return this.x==p.x && this.y==p.y;
        }
        public Pair clone(){
            return new Pair(x, y);
        }
        public String toString(){
            return this.x+" "+this.y;
        }
        public void add(Pair p){
            x+=p.x;
            y+=p.y;
        }
        public Pair negative(){
            return new Pair(-x, -y);
        }
    }
    static class LP implements Comparable<LP>{
        long x, y;
        public LP(long a, long b){
            x=a;
            y=b;
        }
        public void add(LP p){
            x+=p.x;
            y+=p.y;
        }
        public boolean equals(LP p){
            return p.x==x && y==p.y;
        }
        public String toString(){
            return this.x+" "+this.y;
        }
        public int compareTo(LP p){
            int a=Long.compare(x, p.x);
            if(a!=0)
                return a;
            return Long.compare(y, p.y);
        }
    }
    static class Triple implements Comparable<Triple>{
        int x, y, z;
        public Triple(int a, int b, int c){
            x=a;
            y=b;
            z=c;
        }
        public int compareTo(Triple t){
            if(this.y!=t.y)
                return y-t.y;
            return x-t.x;
        }
        public String toString(){
            return x+" "+y+" "+z;
        }
    }
    //    static class MaxSegmentTree{
//        int n;
//        long[] tree;
//        public MaxSegmentTree(int len, long[] arr){
//            n=len;
//            build(0, 0, n-1, arr);
//        }
//        public void build(int i, int l, int r, long[] arr){
//            if(l==r){
//                tree[i]=arr[l];
//                return;
//            }
//            int mid=(l+r)/2, left=2*i+1, right=2*i+2;
//            build(left, l, mid, arr);
//            build(right, mid+1, r, arr);
//            tree[i]=Math.max(left, right);
//        }
//        public int query(int i){
//            return query(0, 0, n-1, 0, i);
//        }
//        public int query(int node, int i, int j, int l, int r){
//            if(l>j || r<i)
//                return -1;
//
//        }
//    }
    static class SegmentTree {
        int n, size[];
        long[] tree;
        public SegmentTree(int len) {
            n = len;
            tree=new long[2*n-1];
            size=new int[2*n-1];
        }
        public void set(int i, long x){
            i+=n-1;
            tree[i]=x;
            size[i]++;
            i=(i-1)/2;
            while(true){
                size[i]++;
                tree[i]=tree[i*2+1] + tree[i*2+2];
                if(i==0)
                    break;
                i=(i-1)/2;
            }
        }
        public long query(int x){
            return query(0, 0, n-1, x+1, n-1);
        }
        public long query(int node, int i, int j, int l, int r){
            if(j<l || i>r)
                return 0;
            if(i>=l && j<=r)
                return tree[node];
            int mid=(i+j)/2, left=node*2+1, right=node*2+2;
            return query(left, i, mid, l, r) + query(right, mid+1, j, l, r);
        }
        public int size(int idx){
            return size(0, 0, n-1, idx+1, n-1);
        }
        public int size(int node, int i, int j, int l, int r){
            if(i>r || j<l)
                return 0;
            if(i>=l && j<=r)
                return size[node];
            int mid=(i+j)/2, left=node*2+1, right=node*2+2;
            return size(left, i, mid, l, r)+size(right, mid+1, j, l, r);
        }
    }
}