fun main(){
    val (h, w, k) = readLine()!!.split(" ").map { it.toInt() }
    val c = MutableList(h){ MutableList(w){0} }
    for (i in 0 until h){
        val x = readLine()!!.split(" ")[0].toCharArray()
        for (j in 0 until w){
            if (x[j] == '#'){
                c[i][j] = 1
            }
        }
    }
    var ans = 0
    var black = 0
    for (i in 0 until 1.shl(h)){
        for (j in 0 until 1.shl(w)){
            val useC = MutableList(h){ MutableList(w){ 0 } }
            for (iii in 0 until h){
                for (jjj in 0 until w){
                    useC[iii][jjj] = c[iii][jjj]
                }
            }
            for (ii in 0 until h){
                if (i and 1.shl(ii) == 1.shl(ii)){
                    for (l in 0 until w){
                        useC[ii][l] = -1
                    }
                }
            }
            for (jj in 0 until w){
                if (j and 1.shl(jj) == 1.shl(jj)){
                    for (l in 0 until h){
                        useC[l][jj] = -1
                    }
                }
            }
            for (l in 0 until h){
                for (m in 0 until w){
                    if (useC[l][m] == 1) black++
                }
            }
            if (black == k) ans++
            black = 0
        }

    }
    println(ans)
}

