#include<bits/stdc++.h>
#define MAX 10005
using namespace std;
double a[MAX];
int main()
{
    int n;
    while(scanf("%d",&n)!=EOF&&n)
    {
        double sum=0;
        int res=0;
        for(int i=0;i<n;i++)
        {
            scanf("%lf",&a[i]);
            sum+=a[i];
        }
        sum/=(double)n;
        for(int i=0;i<n;i++)
            if(a[i]<=sum)res++;
        printf("%d\n",res);
    }
}

