#P307. 【例52.1】 不与最大数相同的数字之和

【例52.1】 不与最大数相同的数字之和

Description

Calculate the sum of all numbers in an integer sequence that are not equal to the maximum number.

Input Format

The input consists of two lines: the first line contains NN, the number of integers to follow (N100N≤100);
The second line contains NN integers, separated by spaces, with each integer ranging from 1,000,000-1,000,000 to 1,000,0001,000,000.

Output Format

Output the sum of all numbers except the maximum number.

Sample

3
1 2 3
3