1. Forced Stop
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output

Train driver Ivan Ivanovich's locomotive broke down while the train was traveling along an inclined section of the track. As a result, the train came to a halt and is currently being held in place by its pneumatic brakes. However, air is gradually leaking from the braking system through the seals...

To prevent the train from rolling away, Ivan Ivanovich decides to place wheel chocks under the train cars. Using a specific formula (which accounts for the incline angle and the mass of the train) he calculates that he needs to place one chock under each car. There are $$$n$$$ cars in the train.

The wheel chocks are stored in the locomotive. Ivan Ivanovich can carry no more than two chocks at a time. Traveling from the locomotive to car $$$i$$$ (or vice versa) takes $$$t \cdot i$$$ seconds.

Determine the minimum amount of time required for him to place all the chocks and return to the locomotive.

For example, if $$$n=4$$$ and $$$t=10$$$, it will take him 120 seconds. One possible sequence of actions for Ivan Ivanovich is as follows: he takes two chocks, walks to the second car (placing one chock under the first car along the way), returns to the locomotive, picks up two more chocks, walks to the fourth car (placing one chock under the third car along the way), and then returns.

An alternative approach, which also results in a total time of 120 seconds, is to first walk to the fourth car (placing a chock under the third car along the way), return, then walk to the second car (placing a chock under the first car along the way), and return once more.

Input

Two integers, $$$n$$$ and $$$t$$$, are provided, each on a separate line ($$$1 \le n \le 10^9$$$, $$$1 \le t \le 10$$$).

Output

Output a single integer — the minimum number of seconds.

Scoring

Subtask 1 (up to 40 points): $$$n \le 1000$$$

Subtask 2 (up to 60 points): no additional constraints.

Example
Input
4
10
Output
120
Note

The answer for the second subtask may exceed the capacity of a 32-bit data type. It is recommended to use a 64-bit data type—for example, 'long long' in C++, 'int64' in Pascal, or 'long' in Java and C#. In Python, no additional steps are required.