fun main() {
  val (H, W, K) = readInts()
  val C = (1..H).map { readString() }

  fun newC(): Array<Array<Char>> {
    val array = Array(H) { Array(W) { '.' } }
    for (h in 0 until H) {
      for (w in 0 until W) {
        array[h][w] = C[h][w]
      }
    }
    return array
  }

  var ans = 0
  for (hb in 0 until 1.shl(H)) {
    for (wb in 0 until 1.shl(W)) {
      val c = newC()
      for (h in 0 until H) {
        for (w in 0 until W) {
          val hf = hb.and(1.shl(h)) > 0
          val wf = wb.and(1.shl(w)) > 0
          if (hf || wf) c[h][w] = 'x'
        }
      }
      var cnt = 0
      for (h in 0 until H) {
        for (w in 0 until W) {
          if (c[h][w] == '#') cnt++
        }
      }
      if (cnt == K) ans++
    }
  }
  println(ans)
}

fun readString() = readLine()!!
fun readStrings() = readString().split(" ")
fun readInt() = readString().toInt()
fun readLong() = readString().toLong()
fun readInts() = readStrings().map { it.toInt() }
fun readLongs() = readStrings().map { it.toLong() }
