/* package whatever; // don't place package name! */ import java.util.*; import java.lang.*; import java.io.*; /* Name of the class has to be "Main" only if the class is public. */ class Ideone { public static void main (String[] args) throws java.lang.Exception { Scanner sc = new Scanner(System.in); // N(立候補者人数) int n = sc.nextInt(); //System.out.println("n=" + n); // 票合計 int hg = 0; // 票配列 int hs[]; hs = new int[n]; int index = 0; while((sc.hasNext()) && (index < n + 1)){ int s = sc.nextInt(); hs[index] = s; //System.out.println("hs[index]=" + hs[index]); hg += s; index++; } //System.out.println("hg=" + hg); // 票基準 int hk = (int)(hg * 0.1); //System.out.println("hk=" + hk); // 供託金合計 int kg = 0; for (int i = 0; i < n; i++){ // 票基準以下は、供託金となる if (hs[i] <= hk ) { kg += 30; } } System.out.println(kg); } }