import java.util.*

fun main(args : Array<String>) {
    val (h, w, k) = readLine()!!.split(" ").map { it.toInt() }
    val cc = Array(h) { readLine()!! }

    val hBitSets = (0L until (1L shl h)).map { BitSet.valueOf(longArrayOf(it)) }
    val wBitSets = (0L until (1L shl w)).map { BitSet.valueOf(longArrayOf(it)) }

    var ans = 0
    hBitSets.forEach { hBits ->
        wBitSets.forEach { wBits ->
            (0 until h).filter { !hBits[it] }.fold(0, { acc, hIdx ->
                acc + (0 until w).filter { !wBits[it] }.count { wIdx -> cc[hIdx][wIdx] == '#' }
            }).let {
                if (it == k) ans++
            }
        }
    }

    println(ans)
}