import java.util.*

fun main() {
    c()
}

fun a() {
    val N = readLong()
    val otsuri = (1000 - N % 1000) % 1000
    println("${otsuri}")
}

fun b() {
    val N = readLong().toInt()
    val map = mutableMapOf<String, Long>()
    repeat(N) {
        val s = readLine()!!
        map[s] = map.getOrDefault(s, 0) + 1
    }
    listOf("AC", "WA", "TLE", "RE").forEach {
        println("$it x ${map.getOrDefault(it, 0)}")
    }
}

fun c() {
    val (H, W, K) = readLongList()
    val set = mutableSetOf<Pair<Int, Int>>()
    repeat(H.toInt()) { h ->
        readLine()!!.forEachIndexed { w, c ->
            if (c == '#') set.add(h to w)
        }
    }

    pairs((0b0 until (1 shl H.toInt()).toLong()), (0b0 until (1 shl W.toInt()).toLong())).count { bits ->
        set.count { it.first in bits.first.bitFilter(1) && it.second in bits.second.bitFilter(1) } == K.toInt()
    }.let { println(it) }
}

fun readLong() = readLine()!!.toLong()
fun readLongList() = readLine()!!.split(" ").map { it.toLong() }

fun Long.bitEach(action: (Int) -> Unit) { (0 until Long.SIZE_BITS).forEach { action(((this shr it) and 1).toInt()) } }
fun Long.bitFilter(bit: Int) = (0 until Long.SIZE_BITS).filter { ((this shr it) and 1) == 1L }

fun <T1, T2> pairs(first: Iterable<T1>, second: Iterable<T2>) = first.flatMap { t1 -> second.map { t2 -> t1 to t2 } }

fun Long.print() { println(this) }