import java.util.Scanner; public class Test { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(), sum = 0, ans = 0; int[] m = new int[n]; for(int i = 0; i < n; i++){ m[i] = sc.nextInt(); sum += m[i]; } for(int i = 0; i < n; i++){ if(m[i]*10 <= sum){ ans += m[i]; } } System.out.println(ans); } }