The positive odd numbers are sorted in ascending order as 1,3,5,7,9,11,13,15,17,19...and grouped as (1), (3,5),(7,9,11), (13,15,17,19)... and so on.
Thus, the first group is (1), the second group is (3,5) , the third group is (7,9,11),.. etc. In general, the group kth contains the next k elements of the sequence.
Given k , find the sum of the elements of the kth group. For example, for k = 3, the answer is : 27 (7+9+11=27)
Complete the function sumOfGroup with input integer k. Return the sum of the elements of the kth group.
Input:
- One line contains integer \(k(0\leq k\leq 10^{6})\)
Output: sum of the elements of the kth group.