So you want to be a 2^n-aire?#1577

So you want to be a 2^n-aire?

1 second
128 megabytes
Hard

The player starts with and must consecutively answer questions. Before each question, the player can:

After correctly answering the last question, the player keeps the winnings. The player's goal is to maximize the expected amount of money won.

For each individual question, the player answers correctly with probability . Assume that is uniformly distributed over the interval .

Input

Each line represents a separate test case and contains two numbers: an integer (1 \leq n \leq 30) and a real number (0 \leq t \leq 1). The last line contains two zeros and should not be processed.

Output

For each test case, print on a separate line the maximum expected amount of money the player can win under the optimal strategy. Print the answer with three decimal digits.

Examples

Example 1

Loading
Loading