#小数チェックその3 R=range J=lambda:list(map(int,input().split())) N,*_=J() A=J() M=sum(A)/N+99.9 print(sum(a>=M for a in A))