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