import java.util.*

fun main(args: Array<String>) {
    val pw = java.io.PrintWriter(System.out)
    Problem.solve(Scanner(System.`in`), pw)
    pw.flush()
}

object Problem {
    fun solve(sc: Scanner, pw: java.io.PrintWriter) {
        val H = sc.next().toInt()
        val W = sc.next().toInt()
        val K = sc.next().toInt()
        val C = Array(H) { sc.next().toCharArray().map { it == '#' }.toBooleanArray() }
        var hmax = 1
        repeat(H) { hmax *= 2 }
        var wmax = 1
        repeat(W) { wmax *= 2 }
        var ans = 0L
        for (hr in 0 until hmax) for (wr in 0 until wmax) {
            var n = 0
            loop@ for (h in 0 until H) for (w in 0 until W) {
                if (C[h][w] && (hr and (1 shl h)) == 0 && (wr and (1 shl w)) == 0) {
                    n++
                    if (n > K) break@loop
                }
            }
            if (n == K) {
                //dprint("($hr, $wr) : $n")
                ans++
            }
        }
        pw.println(ans)
    }
}
