fun main() {
    val (h, w, k) = readInts()

    val grid = Array(h) { readLine()!! }

    var ans = 0
    for (cX in 0 until (1 shl w)) {
        for (cY in 0 until (1 shl h)) {

            var s = 0
            for (x in 0 until w) {
                for (y in 0 until h) {
                    if (cX and (1 shl x) == 0 && cY and (1 shl y) == 0 && grid[y][x] == '#') s++
                }
            }

            if (s == k) ans++
        }
    }
    println(ans)
}

private fun readInt() = readLine()!!.toInt()
private fun readInts() = readLine()!!.split(" ").map { it.toInt() }
private fun readLongs() = readLine()!!.split(" ").map { it.toLong() }
