Speed Battle
vs 0x1234...5678
100 GAME
14:52
Fastest mode

Sum of All Elements Except Largest

A contribution by Thomasj10

Goal

You are given a list of integers. Your task is to compute the sum of all numbers except the largest one. Note: Only one occurrence of the maximum element should be excluded from the sum, even if it appears multiple times in the list.

Input

Line 1: an integer n (number of elements)
Line 2: n space-separated integers

Output

A single integer: the sum of all numbers except the largest element

Constraints

2 ≤ n ≤ 10
-10 ≤ each integer ≤ 10

Example

Input

3
1 5 2

Output

3

Console output

No output yet
01
Mixed Numbers
02
Max Duplicates
03
All Negative

Input:

4
3 -1 7 2

Expected Output:

4