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))
        var count = 0
        for (y in 0 until h) for (x in 0 until w) if (bitSet[y] && bitSet[h + x] && grid[y][x]) count++
        if (count == k) answer++
    }

    println(answer)
}

