SP24998 BITPLAY - PLAYING WITH BITS

Description

The problem is very _simple_. **You** are given a even number **N** and an integer **K** and you have to find the greatest odd number **M** less than **N** such that the sum of digits in binary representation of **M** is atmost **K**.

Input Format

For each testcase, you are given an even number **N** and an integer **K**.

Output Format

For each test case, output the integer **M** if it exists, else print **-1**.