Sum without maximum#646

Sum without maximum

0.5 seconds
256 megabytes
Very easy (≈850)

You are given an array of integers: a_0, a_1, a_2, \dots, a_{n-1}. Your task is to calculate the sum of all elements in the array excluding the elements that are equal to the maximum value. In other words, sum all numbers in the array except the maximum ones.

Input

The first line contains the integer , and the second line contains integers a_0, a_1, a_2, \dots, a_{n-1} (1 \leq n \leq 100,\ -100 \leq a_i \leq 100).

Output

Output the sum of all elements in the array excluding the maximum ones.

Examples

Example 1

Loading
Loading

Scoring

Each correct test case will earn points. The total score is 100.