Submit solution

Points:
3 (partial)

Time limit:
2.0s

Memory limit:
64M

Author:

Problem type

Allowed languages

Ada, Assembly, Awk, Brain****, C, C#, C++, COBOL, ~~CommonLisp~~, D, Dart, F#, Forth, Fortran, Go, ~~Groovy~~, Haskell, Intercal, Java, JS, Kotlin, Lisp, Lua, ~~Nim~~, ~~ObjC~~, OCaml, ~~Octave~~, Pascal, Perl, PHP, Pike, Prolog, Python, Racket, Ruby, Rust, Scala, Scheme, Sed, Swift, TCL, Text, Turing, VB, Zig

Your teacher has decided to give you an early Christmas present: they will drop one of your test marks! Being a very academically focused student, you naturally want your resulting average of the remaining marks to be as high as possible. As a student at the prestigious DMCI: Modern Computing Institute, your marks do not simply range from to , but have a much larger range. Which mark should you drop to maximize your average?

#### Constraints

##### Subtask 1 [10%]

##### Subtask 2 [90%]

#### Input Specification

The first line of input will contain a single integer: .

The next line will contain space-separated integers: , the of which corresponds to your mark.

#### Output Specification

A single integer, the mark that when removed, maximizes the average of the remaining marks.

#### Sample Input 1

```
5
98 -20 96 100 96
```

#### Sample Output 1

`-20`

#### Sample Input 2

```
4
3 3 1 1
```

#### Sample Output 2

`1`

## Comments

System.out.println("

");**lOL hOW diD yOU GEt -20 oN a tESt