class Member { int vote; static int sumVote; Member(int i) { this.vote = i; } } class City { static int money; } public class No_191 { public static void main(String[] args) { java.util.Scanner sc = new java.util.Scanner(System.in); int n = sc.nextInt(); Member[] member = new Member[n]; for (int i = 0; i < n; i++) { member[i] = new Member(sc.nextInt()); Member.sumVote += member[i].vote; City.money += 30; } for (Member m : member) { if (Member.sumVote / 10 < m.vote) { City.money -= 30; } } System.out.println(City.money); } }