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

    val grid = MutableList(h) { readLn() }
    val black = grid.map { it.count { ch -> ch == '#' } }.sum()

    fun remBlack(rowsChosen: Int, colsChosen: Int): Int {
        var rem = black
        for (i in grid.indices) {
            for (j in grid[i].indices) {
                val painted = ((1 shl i) and rowsChosen > 0) || ((1 shl j) and colsChosen > 0)
                if (painted && grid[i][j] == '#') rem--
            }
        }
        return rem
    }

    var ans = 0

    for (i in 0 until (1 shl h)) {
        for (j in 0 until (1 shl w)) {
            if (remBlack(i, j) == k) ans++
        }
    }

    println(ans)
}

// Input Reader
private fun readLn() = readLine()!!

private fun readStrings() = readLn().trim().split(" ")
private fun readInts() = readStrings().map { it.toInt() }
