import math, sequtils, strutils const z = 30 let n = parseInt readLine stdin cs = stdin.readLine.split.map parseInt x = cs.sum div 10 var cnt = 0 for c in cs: if c <= x: inc cnt echo cnt * z