import io.StdIn.{readLine, readInt}
object Main extends App {
  val Array(n, k) = readLine.split(" ").map(_.toInt)
  val as = Seq.fill(n)(readInt)

  Console println (for {
    q <- 0 until as.size
    i <- 0 until as.size - q
  } yield {
    as.slice(i, i + q + 1).sum / (q + 1)
  }).count(_ >= k)
}