import java.util.Scanner

object Main extends App {
  val sc = new Scanner(System.in)
  val H, W, K = sc.nextInt
  sc.nextLine
  val c = Array.fill(H)(sc.nextLine.toCharArray)

  val a = c.map(_.count(_ == '#')).sum
  var z = 0
  if (a >= K) {
    for (i <- 0 to H) {
      val x = (0 until H).combinations(i).toSeq
      x.foreach(f => {
        for (j <- 0 to W) {
          val y = (0 until W).combinations(j).toSeq
          y.foreach(g => {
            val k = (f.isEmpty, g.isEmpty) match {
              case (true, true) =>
                val k = c.map(_.count(_ == '#')).sum
                k
              case (true, false) =>
                val c1 = c.transpose.zipWithIndex.filterNot(h => g.contains(h._2)).map(_._1)
                val k = c1.map(_.count(_ == '#')).sum
                k
              case (false, true) =>
                val c1 = c.zipWithIndex.filterNot(h => f.contains(h._2)).map(_._1)
                val k = c1.map(_.count(_ == '#')).sum
                k
              case (false, false) =>
                val c1 = c.zipWithIndex.filterNot(h => f.contains(h._2)).map(_._1)
                val c2 = c1.transpose.zipWithIndex.filterNot(h => g.contains(h._2)).map(_._1)
                val k = c2.map(_.count(_ == '#')).sum
                k
            }
            if (k == K) z += 1
          })
        }
      })
    }
  }

  println(z)
}
