gets;c=gets.split;p c.count{|e|eval'%d0<='%e+c*?+}*30