import java.util.*

fun main(args : Array<String>) {
    val (h, w, k) = readLine()!!.split(" ").map { it.toInt() }
    val cc = Array(h) { readLine()!! }

    val hEntries = createEntryList(h)
    val wEntries = createEntryList(w)

    fun count(he: String, we: String): Int {
        var cnt = 0
        cc.forEachIndexed { hIdx, hLine ->
            if(he[hIdx] == '0') {
                hLine.forEachIndexed { wIdx, c ->
                    if (we[wIdx] == '0' && c == '#') cnt++
                }
            }
        }
        return cnt
    }


    var ans = 0
    hEntries.forEach { he ->
        wEntries.forEach { we ->
            if (count(he, we) == k) ans++
        }
    }

    println(ans)
}

fun createEntryList(len: Int): List<String> {
    val entries = mutableListOf<String>()
    val bfs = Stack<String>()
    bfs.push("0")
    bfs.push("1")

    while(bfs.isNotEmpty()) {
        val item = bfs.pop()

        if (item.length == len) {
            entries.add(item)
            continue
        }

        bfs.push("${item}0")
        bfs.push("${item}1")
    }

    return entries
}