fun intList() = readLine()?.split(" ")?.map(String::toInt) ?: TODO()
fun main(args: Array<String>) {
    val (h, w, k) = intList()
    val lines = mutableListOf<String>()
    repeat(h) {
        lines.add(readLine() ?: return)
    }

    fun count(removeHIndex: List<Boolean>, removeWIndex: List<Boolean>): Int {
        var count = 0
        lines.forEachIndexed { i, v ->
            v.forEachIndexed { j, c ->
                if (!removeHIndex[i] && !removeWIndex[j] && c == '#') {
                    count++
                }
            }
        }
        return count
    }

    val hList = mutableSetOf<List<Boolean>>()
    val wList = mutableSetOf<List<Boolean>>()
    fun conb(i: Int, seed: List<Boolean>, list: MutableSet<List<Boolean>>) {
        repeat(i) {
            val n = seed.toMutableList()
            if (!n[it]) {
                n[it] = true
                list.add(n.toList())
            }
        }
    }
    hList.add(Array(h) { false }.toList())
    conb(h, Array(h) { false }.toList(), hList)
    repeat(h - 1) {
        hList.toList().forEach {
            conb(h, it, hList)
        }
    }
    wList.add(Array(w) { false }.toList())
    conb(w, Array(w) { false }.toList(), wList)
    repeat(w - 1) {
        wList.toList().forEach {
            conb(w, it, wList)
        }
    }
    var count = 0
    hList.forEach { hIndex ->
        wList.forEach { wIndex ->
            if (count(hIndex, wIndex) == k) {
                count++
            }
        }
    }
    println(count.toString())
}