fun readIntList() = readLine()!!.split(" ").map(String::toInt)

fun main() {
    val (h, w, k) = readIntList()
    val grid = Array(h + 2) { Array(w + 2) { ' ' } }
    for (i in 1..h) {
        val row = readLine()!!
        for (j in row.indices) {
            grid[i][j + 1] = row[j]
        }
    }

    var res = 0
    for (i in 0 until (1 shl h)) {
        for (j in 0 until (1 shl w)) {
            var num = 0

            for (m in 1..h) {
                for (l in 1..w) {
                    if (((i shr (m - 1) and 1) == 1) || ((j shr (l - 1) and 1) == 1)) {
                        continue
                    }
                    if (grid[m][l] == '#') {
                        num += 1
                    }
                }
            }

            if (num == k) {
                res += 1
            }
        }
    }

    println(res)
}
