SP24313 SIOKULE - Kule
Description
Secret Committee members, Little Petar and Little Tux, enjoy playing the board game "Kule" during the breaks between preparing contests and exam revision. The rules of the game assume that the players initially have at their disposal a set of cubes, stacked together to form a tower.
A single turn has Petar splitting the tower into **two or more smaller towers**, and then ordering these smaller towers in an array. Tux then has to **choose** one of the smaller towers. This tower will be used for all future turns, while the remainder is _discarded_. If Tux chooses the kth tower, **Petar is obliged to pay k $ ^{2} $ dinars to him immediately** (e.g. if Tux chose the 3rd tower in the array, Petar has to give him 9 dinars). The game concludes _when only a single cube remains_.
As it is well-known that Secret Committee members don't have time for anything (including playing games), Petar and Tux decided to, instead of actually playing the game, trust each other that they would have played **optimally**, and that Petar should immediately give Tux the amount of dinars that he would have won under that condition. They have asked for your help in determining this amount.
Input Format
The first and only line of the standard input contains a single integer N, the number of cubes in the initial tower.
Output Format
Write to the first and only line of the standard output a single integer M, representing the amount of dinars that Petar should give to Tux.