import kotlin.math.pow

fun main() {
    var inLine = readLine()!!.split(" ").map(String::toInt)
    val h = inLine[0]
    val w = inLine[1]
    val limitk = inLine[2]
    val cList = mutableListOf<MutableList<String>>()
    var result = 0

    for(i in 1 .. h){
        var tmpList = readLine()!!.split("")
        tmpList = tmpList.drop(1).dropLast(1)
        cList.add(tmpList.toMutableList())
    }

    val ptn = 2.0.pow((h + w)).toInt()
    val digit = h + w

    for(i in 0 until ptn){
        val hwStr = (("%"+digit+"s").format(i.toString(2))).replace(" ","0")
        var bCnt = 0
        for(j in 0 until h){
            if(hwStr[j] != '1'){
                for(k in 0 until w){
                    if(hwStr[h + k] != '1'){
                        if(cList[j][k] == "#"){
                            bCnt += 1
                        }
                    }
                }
            }
        }
        if(bCnt == limitk){
            result++
        }
    }

    println(result)
}