package main import ( "bufio" "fmt" "os" "strconv" ) func main() { sc := bufio.NewScanner(os.Stdin) sc.Split(bufio.ScanWords) sc.Scan() N, _ := strconv.Atoi(sc.Text()) a := make([]int, N) var total, t, m int for i := 0; i < N; i++ { sc.Scan() t, _ = strconv.Atoi(sc.Text()) total += t a[i] = t } for i := range a { if a[i] <= total/10 { m += 30 } } fmt.Println(m) }