
< Picture: Designed by Kstudio / Freepik >
Gap is a student at Ajou University. While preparing a department party on the first floor of Paldal Hall, he ordered N pizzas. The delivered boxes sit on the table as a single tower. Gap has to break this tower of height N into towers of height 1. He does not want to do it, but he remembers the line "if you can't avoid it, enjoy it" from Robert Eliot, so he turns the chore into the following game.
At the start of the game the table holds one tower of N pizzas. Gap picks one tower from the table and splits it into two towers. If the two resulting towers have heights B and C, Gap feels B×C pleasure from that split. A tower of height 1 is never split again. Gap repeats this until no tower on the table can be split, and at that moment his preparation is done.
You are given the number of pizzas N that Gap ordered. Find the maximum total pleasure Gap can feel.

< Splitting a tower of height 8 into two towers of height 4 >