input() C=list(map(int,input().split())) O=0 for i in C: if i<=0.1*sum(C):O+=1 print(O*30)