object Main extends App {
  import scala.io.StdIn._
  solve
  def solve: Unit = {
    val Array(n, m, d) = readLine.trim.split(' ').map(_.toInt)
    val state = Array.tabulate(n){_ ⇒ readLine.trim.toCharArray.map(_ == '.')}
    val maxVertical = Array.tabulate(n){h ⇒ Array.tabulate(m){w ⇒ if (state(h)(w)) 1 else 0}}
    for (h ← 1 until n) for (w ← 0 until m) if (state(h)(w)) maxVertical(h)(w) += maxVertical(h - 1)(w)
    val maxHorizontal = Array.tabulate(n){h ⇒ Array.tabulate(m){w ⇒ if (state(h)(w)) 1 else 0}}
    for (w ← 1 until m) for (h ← 0 until n) if (state(h)(w)) maxHorizontal(h)(w) += maxHorizontal(h)(w - 1)
    println(
      maxVertical.map{_.count(_ >= d)}.sum + maxHorizontal.map{_.count(_ >= d)}.sum
    )
  }
  implicit class ScopeFunc[T](private val value: T) {
    def let[A](func:T ⇒ A): A = func(value)
    def also(func:T ⇒ Unit): T = {
      func(value)
      value
    }
  }
}


