#Z15112. 不与最大数相同的数字之和

不与最大数相同的数字之和

Description

Output the sum of the 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 an integer N (the number of integers to follow, N ≤ 100);
  • The second line contains N integers separated by spaces, where each integer ranges from -1,000,000 to 1,000,000.

Output Format

Output the sum of the numbers excluding the maximum number.

3
1 2 3

3