The positive odd numbers are sorted in ascending order as , and grouped as and so on.
Thus, the first group is , the second group is , the third group is , etc. In general, the group contains the next elements of the sequence.
Given , find the sum of the elements of the group. For example, for , the answer is :
Complete the function sumOfGroup
with input integer . Return the sum of the elements of the th group.
Constraints
Subtasks
- For of the maximum score,
Sample Input
Sample Output
Explanation
We have . The rd group is and the sum of its elements is .