You are given a permutation of the integers from to . Your score is initially .
In one move, choose two indices such that , swap and , and add to your score.
You may perform any number of moves, including zero. Find the maximum total score you can obtain.
For each test case, print one integer: the maximum total score you can obtain.