e-olymp
Problems

Paint2D

Paint2D

You can "select", "copy", "insert" and "move" in another place a figures on the screen of the graphic editor Paint2D.

You have on the screen portrayal of individual square. What the least quantity of these operations you have to do for building of another rectangle, which size is AxB. The rectangle broke on the squares like individual square. (A is width, B is height).

prb18en

Input

Two numbers A and B. A, B – is natural numbers, no more than 1000.

Output

Minimal quantity of operations.

Time limit 1 second
Memory limit 64 MiB
Input example #1
2 3
Output example #1
12
Author В.Л.Дидковский