fun c() {
    val (h, w, k) = readLine()!!.split(" ").map(String::toInt)
    val c = Array(h) {
        readLine()!!
    }
    var result: Int = 0
    for (caseH in 0 until (1 shl h)) {
        for (caseW in 0 until (1 shl w)) {
            var black: Int = 0
            for (i in 0 until h) {
                for (j in 0 until w) {
                    if ((caseH shr i) and 1 == 0 && (caseW shr j) and 1 == 0 && c[i][j] == '#') {
                        black++
                    }
                }
            }
            if (black == k) result++
        }
    }
    println(result)
}

fun main() {
    c()
}