val map = ArrayList<ArrayList<Int>>()
var ans = 0

fun main(){
    val h = readInt()
    val w = readInt()
    val k = readInt()

    for (i in 1..h){
        val line = read().toCharArray().map{if(it == '#') 1 else 0}
        map.add(line as ArrayList<Int>)
    }

    for (i in 1..1.shl(h+w)){
        var count = 0
        for (mx in 0 until w){
            for (my in 0 until h){
                if((i.and(1.shl(mx)) > 0) and (i.and(1.shl(w+my)) > 0)){
                    count += map[my][mx]
                }
            }
        }
        if(count == k) ans++
    }

    println(ans)
}

private val inputQue = ArrayList<String>()

private fun myReadLine(){
    inputQue.addAll(readLine()!!.split(' '))
}

fun read() : String {
    if(inputQue.isEmpty()) myReadLine()
    return inputQue.removeAt(0)
}

fun readInt() = read().toInt()

fun readLong() = read().toLong()

fun readDouble() = read().toDouble()
