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.
#include <bits/stdc++.h>
using namespace std;
const int inf = 1e9 + 5;
const long long mo = 1e9 + 7;
long long sx, sy, ex, ey, dx[6] = {0, 1, 0, -1, 0, 0},
                          dy[6] = {1, 0, -1, 0, 0, 0}, m, n, k,
                          dz[6]{0, 0, 0, 0, -1, 1}, sg;
long long p, no, v, ans, w;
int par[55000];
long long a[500005], b[400005], st[500006], d[400006], l[500006], r[500006];
long long gcd(long long a, long long b) { return a ? gcd(b % a, a) : b; }
set<long long> se;
long long qu(long long a, long long b, long long m) {
  long long ans = 1;
  while (b) {
    if (b & 1) {
      ans = ans % m * a % m;
    }
    b >>= 1;
    a = a % m * a % m;
  }
  return ans;
}
int su(int n) {
  if (n == 1 || n == 0) return 0;
  for (int i = 2; i <= sqrt(n); i++) {
    if (n % i == 0) return 0;
  }
  return 1;
}
int fi(int a) {
  if (a == par[a])
    return a;
  else
    return par[a] = fi(par[a]);
}
map<long long, long long> mp, mp1;
priority_queue<long long> que;
pair<long long, long long> a1[400000];
int vis[1005][1005], vis1[400005];
char maze[1005][1005], maze1[505][505];
vector<long long> g[400000], g1[400000];
string s1;
struct node {
  long long x, y, t;
};
vector<long long> ve, ve1[3];
int cmp1(pair<long long, long long> a, pair<long long, long long> b) {
  return a.first > b.first;
}
int cmp(long long a, long long b) { return a > b; }
int ok(int x, int y) {
  if (x >= 1 && x <= n && y >= 1 && y <= m && !vis[x][y] && maze[x][y] == '.')
    return 1;
  return 0;
}
int can(long long x) {
  long long ans = 0, l = x, r = x + 1;
  if (x & 1) r--;
  while (1) {
    ans += min(r, n) - l + 1;
    r <<= 1;
    r++;
    l <<= 1;
    if (l > n) break;
  }
  return ans >= k;
}
int main() {
  int t, p2, p3;
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  string ss, sss, s;
  long long l, r, n1, u;
  int tot = 1;
  while (cin >> n >> k) {
    ans = 0;
    l = 1, r = n / 2;
    while (r >= l) {
      long long mid = (l + r) / 2;
      if (can(mid * 2))
        l = mid + 1, ans = mid * 2;
      else
        r = mid - 1;
    }
    l = 0, r = n / 2;
    while (r >= l) {
      long long mid = (l + r) / 2;
      if (can(mid * 2 + 1))
        l = mid + 1, ans = max(mid * 2 + 1, ans);
      else
        r = mid - 1;
    }
    cout << ans << endl;
  }
}
