Skip to main content
LIVE CONTEST: Round #7 · Begin Marathon is live now! …

~/algor $ cat problems/array/elements-above-the-average

Elements above the average

Author Iqbolshoh Ilhomjonov 3 @iqbolshoh 650 problems
Easy 1000 ms 128 MB 23%
Share

A positive integer and an array of integers are given. Determine the number of elements whose value is strictly greater than the arithmetic mean of the array.

Counting the elements greater than the arithmetic mean of an array

Input

The first line contains a positive integer . The second line contains integers separated by spaces.

Output

One integer — the number of elements greater than the arithmetic mean.

Note


Examples

Input #1
5
1 2 3 4 10
Output #1
1
Input #2
3
5 5 5
Output #2
0

Sign in to submit a solution

Signing up is free and takes a minute.