You have an array of integers , indexed from to . You need to find an array of positive integers where for each .
If there are multiple solutions, minimize the summation of the numbers in . Formally you have to minimize .
You don't need to print the array, we are only interested to know the minimum possible value of .
Note: is the largest integer that isn't more than . For example: and . This is known as Floor Function.
Input Format
The first line contains , the size of array .
The second line contains integers. Here, the integer is .
Constraints
Output Format
Print one integer: The minimum possible value of .
Sample Input
5
18 27 16 22 6
Sample Output
25
Explanation
Array with minimum sum:
The sum is:
The fractions are: