At first, let's define function f(x) as follows: $$$ \begin{matrix} f(x) & = & \left\{ \begin{matrix} x/2 & \mbox{if } x  is even \\\ x - 1 & \mbox{otherwise } \end{matrix} \right. \end{matrix} $$$

We can see that if we choose some value v and will apply function f to it, then apply f to f(v), and so on, we'll eventually get 1. Let's write down all values we get in this process in a list and denote this list as path(v). For example, path(1) = [1], path(15) = [15, 14, 7, 6, 3, 2, 1], path(32) = [32, 16, 8, 4, 2, 1].

Let's write all lists path(x) for every x from 1 to n. The question is next: what is the maximum value y such that y is contained in at least k different lists path(x)?

Formally speaking, you need to find maximum y such that \left| \{ x ~|~ 1 ≤ x ≤ n, y ∈ path(x) \} \right| ≥ k.

Input

The first line contains two integers n and k (1 ≤ k ≤ n ≤ 10^{18}).

Output

Print the only integer — the maximum value that is contained in at least k paths.

Examples

Input


11 3


Output


5


Input


11 6


Output


4


Input


20 20


Output


1


Input


14 5


Output


6


Input


1000000 100


Output


31248

Note

In the first example, the answer is 5, since 5 occurs in path(5), path(10) and path(11).

In the second example, the answer is 4, since 4 occurs in path(4), path(5), path(8), path(9), path(10) and path(11).

In the third example n = k, so the answer is 1, since 1 is the only number occuring in all paths for integers from 1 to 20.

//When I wrote this code, only God & I understood what it did. Now only God knows !!


import java.util.*;
import java.io.*;
import java.math.*;


public class Main {

    static class FastReader
    {
        private InputStream mIs;private byte[] buf = new byte[1024];private int curChar,numChars;public FastReader() { this(System.in); }public FastReader(InputStream is) { mIs = is;}
        public int read() {if (numChars == -1) throw new InputMismatchException();if (curChar >= numChars) {curChar = 0;try { numChars = mIs.read(buf);} catch (IOException e) { throw new InputMismatchException();}if (numChars <= 0) return -1; }return buf[curChar++];}
        public String nextLine(){int c = read();while (isSpaceChar(c)) c = read();StringBuilder res = new StringBuilder();do {res.appendCodePoint(c);c = read();}while (!isEndOfLine(c));return res.toString() ;}
        public String next(){int c = read();while (isSpaceChar(c)) c = read();StringBuilder res = new StringBuilder();do {res.appendCodePoint(c);c = read();}while (!isSpaceChar(c));return res.toString();}
        public long l(){int c = read();while (isSpaceChar(c)) c = read();int sgn = 1;if (c == '-') { sgn = -1 ; c = read() ; }long res = 0; do{ if (c < '0' || c > '9') throw new InputMismatchException();res *= 10 ; res += c - '0' ; c = read();}while(!isSpaceChar(c));return res * sgn;}
        public int i(){int c = read() ;while (isSpaceChar(c)) c = read();int sgn = 1;if (c == '-') { sgn = -1 ; c = read() ; }int res = 0;do{if (c < '0' || c > '9') throw new InputMismatchException();res *= 10 ; res += c - '0' ; c = read() ;}while(!isSpaceChar(c));return res * sgn;}
        public double d() throws IOException {return Double.parseDouble(next()) ;}
        public boolean isSpaceChar(int c) { return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1; }
        public boolean isEndOfLine(int c) { return c == '\n' || c == '\r' || c == -1; }
        public void scanIntArr(int [] arr){ for(int li=0;li<arr.length;++li){ arr[li]=i();}}
        public void scanLongArr(long [] arr){for (int i=0;i<arr.length;++i){arr[i]=l();}}
        public void shuffle(int [] arr){ for(int i=arr.length;i>0;--i) { int r=(int)(Math.random()*i); int temp=arr[i-1]; arr[i-1]=arr[r]; arr[r]=temp; } }
    }

    public static void main(String[] args) throws IOException {

        FastReader fr = new FastReader();
        PrintWriter pw = new PrintWriter(System.out);
        /*
inputCopy
11 3
outputCopy
5
inputCopy
11 6
outputCopy
4
inputCopy
20 20
outputCopy
1
inputCopy
14 5
outputCopy
6
inputCopy
1000000 100
outputCopy
31248
  */
        long n=fr.l();
        long k=fr.l();
        long right=n;
        long left=1;
        while(left<right)
        {
            if(left/2 == right/2)
                break;
            long mid=(left+right)/2;
            long curK=0;
            long other=mid%2==0?mid-1:mid+1;
            long curK1=getK(mid,n);
            long curK2=getK(other,n);
            curK=Math.max(curK1,curK2);
            //System.err.println(mid+" "+curK);
            if(curK<k)
                right=mid-1;
            else
                left=mid+1;
        }
        //System.err.println("left="+left);
        left+=4;
        long k2=getK(left,n);
        while(k2<k || left>n) {
            --left;
            k2=getK(left,n);
        }
        pw.println(left);
        pw.flush();
        pw.close();
    }
    public static long getK(long num,long n)
    {
        long curK=0;
        long lowerBound=num;
        long upperBound=num%2==0?num+1:num;
        while(upperBound<n)
        {
            curK+=(upperBound-lowerBound)+1;
            lowerBound*=2;
            upperBound=2*upperBound+1;
        }
        curK+=Math.max((n-lowerBound)+1,0);
        return curK;
    }
}
