gets;c=gets.split.map &:to_i;s=c.reduce :+;p c.count{|e|s>=e*10}*30