#kyotaku 191 N=int(input()) C=[int(i) for i in inout().split()] S=0 for i in range(N): S+=C[i] K=0 for i in range(N): if C[i]*10<=S: K+=C[i] print(K)