import java.util.*

fun main() = Thread(null, ::abc173c, "(^o^)", 128 * 1024 * 1024).apply { start() }.join()

@OptIn(ExperimentalStdlibApi::class)
fun abc173c() {
    val (h, w, k) = readLine()!!.split(' ').map { it.toInt() }
    val grid = (1..h).map { readLine()!!.map { it == '#' }.toBooleanArray() }.toTypedArray()

    var answer = 0

    for (i in 0L until (1L shl h + w)) {
        val bitSet = BitSet.valueOf(longArrayOf(i))
        val currGrid = grid.map { it.copyOf() }
        (0 until h).filter { bitSet[it] }.forEach { h1 -> (0 until w).forEach { currGrid[h1][it] = false } }
        (h until h + w).filter { bitSet[it] }.forEach { w1 -> (0 until h).forEach { currGrid[it][w1 - h] = false } }
        if (currGrid.sumBy { it.count { it } } == k) answer++
    }

    println(answer)
}

