The image depicts a standard die with numbers from to on its faces.
In the image, only three faces of the die are visible. The hidden faces have the numbers , , and , arranged so that the sum of the numbers on opposite faces is . Specifically, is opposite , is opposite , and is opposite .
Petya places the die in the top-left cell of a table with rows and columns. The die is initially oriented so that the top face shows , and the face with is to the right. Petya then performs the following steps:
He rolls the die to the right, from cell to cell, until he reaches the last column.
He then rolls the die down to the next row.
Next, he rolls the die to the left until he reaches the first column.
As in step , he rolls the die down to the next row.
Petya repeats these steps as long as possible, i.e., until it is no longer possible to roll the die down to a next row. Whenever the die lands on a cell, Petya records the number on the top face of the die. At the end, he sums all the recorded numbers.
Help Petya check if his calculation is correct.
The input file contains one line with two positive integers and (1 \leq R,\; C \leq 100000) — the dimensions of the table.
The output file must contain a single number — the sum obtained according to the rules described in the statement.
Example 1