All problems

Filling Boxes With Color

easyPythonMatplotlibBox Plot

Thornhill Labs fills the boxes with solid colour rather than leaving them as outlines, so that a box overlapping another still reads as one shape. The filled box covers the middle half of the batch and hides how the readings sit inside it. What the report adds underneath is a count that speaks to the batch's lopsidedness: how many readings beat the batch average.

Task: Print how many readings are strictly above the average of the batch. A reading landing exactly on the average is not above it and does not count.

Input

The first line holds an integer n, the number of readings. Each of the next n lines holds one reading, possibly with decimals, in no particular order. n is at least 1.

Output

One line holding a whole number: how many readings beat the average.

Example:

Input:
5
10
20
30
40
50

Output:
2

Sign in to solve this problem

Reading problems is free for everyone — solving them (Run, Submit, and tracking what you've solved) needs an account.

Sign in

Discussion

Sign in to join the discussion — reading is open to everyone.

Loading comments…