fun main() {
    val (h, w, k) = nextIntList()
    val mat = (0 until h).map {
        next()
    }
    var res = 0
    val rowSelection = sizedArray(h, false)
    val columnSelection = sizedArray(w, false)

    fun calcW(index: Int, selecH: Array<Int>, selecW: List<Boolean>) {
        if (index == w) {
            // calc result
            if (selecH.filterIndexed { indx, _ -> selecW[indx] }.sum() == k) {
                res++
            }
            return
        }
        // true
        calcW(index + 1, selecH, selecW + true)
        // false
        calcW(index + 1, selecH, selecW + false)
    }

    fun calcH(index: Int, selec: Array<Int>) {
        if (index == h) {
            calcW(0, selec, listOf())
            return
        }
        // true
        val row = mat[index]
        calcH(index + 1, selec.mapIndexed { indx, i -> i + (if (row[indx] == '#') 1 else 0) }.toTypedArray())
        // false
        calcH(index + 1, selec)
    }

    calcH(0, sizedArray(w, 0))
    println(res)
}

// # Utils
// ## Input
fun next() = readLine()!!
fun nextInt() = next().toInt()
fun nextLong() = next().toLong()
fun nextDouble() = next().toDouble()
fun nextList() = next().split(" ")
fun nextIntList() = next().split(" ").map(String::toInt)
fun nextLongList() = next().split(" ").map(String::toLong)
fun nextDoubleList() = next().split(" ").map(String::toDouble)

// ## Array
inline fun <reified T> sizedArray(size: Int, default: T) = Array(size) { default }

// ## mod^-1
//    [NOTE] CANNOT use this for 0, mod, 2mod, 3mod ...(return wrong value)
fun modinv(num: Long, mod: Long): Long {
    var a = num
    var b = mod
    var u = 1L
    var v = 0L
    while (b > 0) {
        val t = a.div(b)
        a -= t * b
        a = b.also { b = a } // swap a and b
        u -= t * v
        u = v.also { v = u } // swap u and v
    }
    u %= mod
    if (u < 0) u += mod
    return u
}