Box of Bricks#6186

Box of Bricks

1 second
64 megabytes
Very easy

Pasha assembled box of bricks in the form of a rectangular parallelepiped and thought over the question: what is the minimal number of bricks lying on the route between two opposite corners of the parallelepiped, if it is allowed to pass from brick to other brick through the common face, edge or vertex? In the figure, the opposite bricks are highlighted.

Help Pasha to write a program that calculates the minimal number of bricks on the route.

Input

Integer , , (1 \le n, m, k \le 1000) — the size of rectangular parallelepiped (in bricks).

Output

Integer — the minimal number of bricks.

Examples

Example 1

Loading
Loading