4. Cakes
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output

There are $$$D$$$ children attending a kindergarten. One day, during a festive breakfast, they were served a certain number of cakes. It is known that:

  • each child received an equal number of cakes,
  • if necessary, the cakes could be cut in half (into two equal parts),
  • the cook remembers that at least A cakes were purchased in total,
  • all the cakes were distributed to the children, there were no extra cakes or half-cakes left.
Write a program to calculate the smallest possible number of purchased cakes.
Input

The first line of the input data contains an integer $$$D$$$ ($$$1 \le D \le 10^9$$$).

The second line contains an integer $$$A$$$ ($$$0 \le A \le 10^9$$$).

Output

Print a single integer — the smallest number of cakes that could have been purchased.

Scoring

Solutions that work for $$$D \le 1000$$$, $$$A \le 1000$$$ will be scored out of 50 points.

Example
Input
4
5
Output
6
Note

In the example from the problem statement, 6 cakes could have been purchased. Two of them were cut in half, and each child received one whole cake and one half.