import strutils, sequtils, math let N, C = stdin.readLine.split.map parseInt let sum_C = C.sum var ttl = 0 for c in C: if c * 10 <= sum_C: ttl += 30 echo ttl