RHHS is a very popular school and has a very large number of students. However, this year there are too many students and not enough rooms for all of them. You have been tasked with building a new school building to accommodate
The new school can have an unlimited number of floors, provided that there are no gaps in the building. Each floor can have an unlimited number of rooms. The cost of building the
Constraints
For all subtasks:
Points Awarded | |
---|---|
6 points | |
9 points |
Input Specification
The first and only line contains three integers
Output Specification
Output the minimum cost required to build the new school. Please note that this number may not fit inside a 32-bit integer.
Sample Input
Copy
5 5 7
Sample Output
Copy
94
Comments