#P3231. Optimizing F Reagent Usage

    ID: 16488 Type: Default 1000ms 256MiB

Optimizing F Reagent Usage

Optimizing F Reagent Usage

Dr. T is working in a biology laboratory with a rectangular dissection plate of size \(a \times b \times c\). The plate is divided into \(a \times b \times c\) unit cubes, each of size \(1\times1\times1\) and labeled as \((i, j, k)\). In order to perform disinfection, he is required to disinfect certain unit cubes (a cube may be disinfected more than once).

The disinfection process uses a peculiar reagent, F. When disinfecting a rectangular block of dimensions \(x \times y \times z\) (consisting of \(x \times y \times z\) unit cubes), the reagent consumption is \(\min(x, y, z)\) units.

Since the reagent is expensive, Dr. T wants to minimize the total amount of F reagent used while ensuring that all the required regions are disinfected. Given that overlapping disinfecting operations are allowed, determine the minimum total number of F reagent units needed to disinfect the entire plate.

Note: As all unit cubes need to be disinfected at least once, one optimal strategy is to disinfect the entire plate in one operation, using \(\min(a, b, c)\) units of reagent.

inputFormat

The input consists of a single line containing three positive integers \(a\), \(b\), and \(c\) separated by spaces, representing the dimensions of the plate.

outputFormat

Output a single integer, the minimum number of units of F reagent required.

sample

2 2 2
2