var count, i, n : integer; s : real; a : array [1..1000] of integer; begin read (n); s := 0; for i := 1 to n do begin read (a); s := s + a; end; s := s / n; count := 0; for i := 1 to 1000 do if a > s then inc (count); writeln (count); end.