Problems
Sum without maximum
Sum without maximum
Given array of n integers. Find the sum of all array elements, not equal to maximal.
Input
First line contains number n (n ≤ 100). Next line contains n integers, each of them does not exceed 100 by absolute value.
Output
Print the sum of all array elements, not equal to maximal.
Input example #1
6 5 9 3 4 6 9
Output example #1
18