fun main(args: Array<String>) {
    val (H, W, K) = readLine()!!.split(' ').map { it.toInt() }
    val c = (1..H).map { readLine()!! }
    var ans = 0
    for (bitH in 0 until (1 shl H)) {
        for (bitW in 0 until (1 shl W)) {
            val count = c.mapIndexed { i, row ->
                row.mapIndexed { j, ch ->
                    if (ch == '#' && (bitH and (1 shl i) == 0) && (bitW and (1 shl j) == 0)) {
                        1
                    } else {
                        0
                    }
                }.sum()
            }.sum()
            if (count == K) {
                ans++
            }
        }
    }
    println(ans)
}