Mirko doesn't like Latin homeworks so he made a bet with Slavko. The loser will be writing homeworks for both of them for the entire month. Mirko wants to win so he designed this problem they could have something to bet on.

At his desk, he found a cube with numbers
Mirko has put the cube in the upper left field of the matrix of
Mirko now makes the following moves:
- He rolls the cube to the right, until it reaches the last column
- Then he rolls it down (to the next row)
- Now he rolls the cube to the left, until it reaches first column
- Like in step
, he rolls it down (to the next row)
Mirko is repeating these steps for as long as he can, i.e. as long as he can roll the cube in the next row. When a cube reaches some field, Mirko writes down the number on the top of the cube. In the end, he sums all of the numbers he had written.
Mirko made a bet with Slavko that he could calculate that sum without error. Help Slavko verifying Mirko's solution!
Input Specification
First and only line of input contains two positive integers.
Output Specification
First and only line of input should contain the sum described in the task.
Scoring
In test cases worth
Sample Input 1
3 2
Sample Output 1
19
Explanation for Sample Output 1
The numbers Mirko wrote down are:
Sample Input 2
3 4
Sample Output 2
42
Sample Input 3
737 296
Sample Output 3
763532
Comments