For this Question: Given N. You have to construct an array Arr of N integers such that it contains integers from 1 to N and each integer comes at max once. The goodness of the array is summation (Arr[i]%i) for i from 1 to N.
You have to construct array with maximum goodness. As N can be huge you only have to report the maximum goodness and not the array.Input contains a single integer N.

Constraints:
1 <= N <= 1000000000Print the maximum goodness possible.Sample Input
2

Sample Output
1

Explanation: Array constructed will be [2, 1] goodness = 1%2 + 2%1 = 1

Sample Input
5

Sample Output
10

Explanation: Array constructed will be [1, 3, 4, 5, 2] goodness = 1%1 + 2%3 + 3%4 + 4%5 + 5%2 = 10, I have written this Solution Code: n=int(input())# Your code here
print((n-1)*n//2), In this Programming Language: Python, Now tell me if this Code is compilable or not?