gets
a=gets.split.map &:to_i
s=a.reduce(:+)/10
p a.count{|e|e<=s}*30