Except for the smallest and the largest#8960

Except for the smallest and the largest

1 second
64 megabytes
Very easy

An array of integers is provided as input. The task is to calculate the sum of the array's elements, excluding all instances of its smallest and largest values.

Input

The first line contains a natural number . The second line contains integers. Each integer has an absolute value not exceeding .

Output

Output the calculated sum.

Examples

Example 1

Loading
Loading