package b20160710; import java.util.Scanner; public class No_191 { public static void main(String[] args) { double sum = 0; Scanner sc = new Scanner(System.in); int N = sc.nextInt(); int[] MiT = new int[N]; for(int i = 0; i < N; i++){ MiT[i] = sc.nextInt(); sum+= MiT[i]; } sc.close(); double MP = sum * 0.1; int CMiT = 0; for(int i = 0; i < N; i++){ if(MiT[i] <= MP){ CMiT += 30; } } System.out.println(CMiT); } }