#include <bits/stdc++.h>
using namespace std;
int a[200];
int main() {
int n, m = 0, h, k = 0;
cin >> n;
for (int i = 0; i < n; i++) {
cin >> a[i];
m = m + a[i];
}
h = m / n;
for (int l = 0; l < n; l++) {
if (a[l] > h) {
k++;
}
}
cout << k;
return 0;
}