fun main(args: Array<String>) {
    val (h, w, k) = readIntList()
    val c = MutableList(h) { "0" }

    for (i in 0 until h) {
        c[i] = readString()
    }

    var ans = 0
    for (maskR in 0 until (1 shl h)) {
        for (maskC in 0 until (1 shl w)) {
            var black = 0
            for (i in 0 until h) {
                for (j in 0 until w) {
                    if (((maskR shr i) and 1) == 0 && ((maskC shr j) and 1) == 0 && c[i][j] == '#') {
                        black++
                    }
                }
            }
            if (black == k) {
                ans++
            }
        }
    }
    println(ans)
}

// Tools
fun readString() = readLine()!!
fun readInt() = readLine()!!.toInt()
fun readLong() = readLine()!!.toLong()
fun readStringList() = readLine()!!.split(" ")
fun readIntList() = readLine()!!.split(" ").map(String::toInt)
fun readLongList() = readLine()!!.split(" ").map(String::toLong)