Cheese for Anfisa#537

Cheese for Anfisa

1 second
256 megabytes
Very easy

The host has a piece of cheese left in the shape of a rectangular box whose side lengths are integers. Cooking a new dish for Anfisa, the host has to cut this piece into cubes with side .

Each cut splits exactly one piece of cheese into two parts: several pieces may not be stacked together and cut at once.

What is the minimum number of cuts the host has to make to cut the whole piece into cubes with side ?

Example for a = 1, b = 2, and c = 2

Input

The first line contains one integer (1 \leq a \leq 1\,000) — the height of the box.

The second line contains one integer (1 \leq b \leq 1\,000) — the width of the box.

The third line contains one integer (1 \leq c \leq 1\,000) — the length of the box.

Output

Print one integer — the minimum number of cuts.

Examples

Example 1

Loading
Loading