Competitions

# Linear arrays

# 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

Input example #3

10 -71 -99 -72 -94 -97 -96 -22 -12 -26 -99

Output example #3

-676