N = int(input()) A = list(map(int, input().split())) L = int(sum(A)/N) + 100 ans = sum([A[i] >= L for i in range(N)]) print(ans)