Time

10:34:13
11 Feb 2012
ACM-ICPC Thailand Southern Region Programming Contest 2011
Left: 4 hours 26 minutes
End: 11.02.2012 15:00
Leader: Informatimukas
Five for week 22
Left: 11 hours 26 minutes
End: 11.02.2012 22:00
Leader: NuM
Version for print

Paint3D

prb25    Figures on a sheet of photo editor PA²NT can select and copy (in full), paste and move (drag). What is the smallest number of such operations should be used to having an image on a sheet of the unit cube, to build another image - a cuboid with dimensions AxBxC made up of these cubes?


Specifications

   Input

  In the input file contains the number of A, B, C. 1A, B, C100.

   Output

   The output file to write the answer - the smallest number of operations.


Problem information

Time Limit: 1 seconds
Memory Limit: 64 MB
Balls for the passed test: 10
Complexity: 45% 64/116
Classes: Dynamic programming

Example

Example input

2 3 4

Example output

20


← Paint2D-Crack Problems New-year presents →