408157: GYM103029 D John and pizza

Memory Limit:256 MB Time Limit:1 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

D. John and pizzatime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard output

Katya went home( John was very tired and hungry. He took a frozen pizza from a fridge to cook pizza by himself.

John is a very smart boy, he knows that if you cut the pizza into triangles, then more pizza will fit into the oven. John has endless supplies of hexagonal pizzas, each of these pizzas John cut into $$$6$$$ equilateral triangles with side $$$1$$$.

John has an oven of size $$$n * m$$$ in his flat. John's task is to place as many pieces of pizza in the oven as possible with only one condition. John likes when the pizza slices lie in the oven beautifully, so the boy needs to choose the side of the oven, and arrange all the pizza slices so that one side of each pizza slice is parallel to the selected side of the oven.

Help him find out how many pieces of pizza (equilateral triangles with side $$$1$$$) John can put in the oven.

Input

You get two numbers $$$n, m$$$ ($$$1 \le n, m \le 10^{5}$$$)

Output

Just find the answer)

ExampleInput
1 1
Output
1

加入题单

上一题 下一题 算法标签: