n = int(input()) a = list(map(int,input().split())) avg = sum(a)/n res =0 for ele in a: if ele>avg: res +=1 print(res)