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

    repeat(h) {
        val s = readLine()!!
        map[it] = s
    }

    var answer = 0

    val digits = h + w
    val max = Math.pow(2.0,digits.toDouble()).toInt()
    for (i in 0..max) {
        val fullStr = String.format("%${digits}s", Integer.toBinaryString(i)).replace(" ", "0")
        val delH = fullStr.substring(0,h)
        val delW = fullStr.substring(h,h+w)
        var cnt = 0
        for (i in 0 until h) {
            for (j in 0 until w) {
                if (map[i][j] == '#' && delH[i] != '0' && delW[j] != '0') cnt++
            }
        }
        if (cnt == k) answer++
    }
    println(answer)
}
