Paint2D#18

Paint2D

1 second
64 megabytes
Medium

You can select, copy (entirely), paste, and move figures in a graphics editor such as PAINT.

Given a single unit square on the screen, what is the minimal number of these operations required to construct a rectangle of size A \times B, divided into unit squares like the original? Here, is the width and is the height.

prb18

Input

Two natural numbers and (1 \leq A, B \leq 1000).

Output

The minimal number of operations.

Examples

Example 1

Loading
Loading