Your aunt brings you a cake consisting of $$$N$$$ pieces arranged in a straight line, labeled as cakes $$$1, 2, 3, \ldots, N$$$. Initially, each piece of cake has a deliciousness value of $$$0$$$. You can choose to eat the $$$i^{th}$$$ piece of cake, provided that neither of its adjacent pieces has been eaten and that the $$$i^{th}$$$ piece is not at the edge. Once you eat a piece of cake, it will distribute deliciousness to its adjacent pieces, keeping going until it hits the edge or its adjacent pieces have already been eaten. Once the cake distributes deliciousness to all the pieces it can, for every $$$j^{th}$$$ piece that got distributed in the previous step, its deliciousness value will increase by $$$|i-j|$$$ .
You will continue to eat cake until there are no more pieces that can be eaten under the given conditions. At that point, you can use a special ability that allows you to eat all the remaining pieces at once. Do you want to know how much deliciousness you can consume to maximize the total deliciousness of the cake?
The first line contains $$$N$$$, representing the number of cake pieces. $$$(1 \leq N \leq 1,000,000)$$$
Output one integer representing the maximum deliciousness.
1
0
2
0
3
2
4
4
10
74
In the first and second examples, you can't eat any cake under the given conditions, so the answer is $$$0$$$.
In the third example, you can eat the $$$2^{nd}$$$ piece of cake, and it will distribute deliciousness to the other $$$2$$$ pieces. Then, you can eat all of the remaining cake pieces and get a total deliciousness value of $$$2$$$.
In the fourth example, you can eat the $$$3^{rd}$$$ piece of cake, which will distribute $$$1$$$ deliciousness to the $$$2^{nd}$$$ and $$$4^{th}$$$ pieces and $$$2$$$ deliciousness to the $$$1^{st}$$$ piece. After that, you can eat all the remaining pieces and achieve a total deliciousness value of $$$4$$$.
For the third and fourth examples, the cake will distribute deliciousness like the following figures.
Fig. A.1: Illustration of the cakes in the third and fourth examples.
| Name |
|---|


