
import java.util.*

fun main() {
    val sc = Scanner(System.`in`)
    val h = sc.nextInt()
    val w = sc.nextInt()
    val k = sc.nextInt()
    val board = Array(h){CharArray(w)}

    for(i in 0 until h) {
        board[i] = sc.next().toCharArray()
    }

    var blkCnt = 0
    for(i in 0 until h) {
        for(j in 0 until w) {
            if(board[i][j] == '#')
                ++blkCnt
        }
    }

    fun dfs(v:List<Boolean>, cnt:Int): Int {
        if(cnt == h+w) {
            val s = HashSet<Pair<Int,Int>>()
            val row = ArrayList<Int>()
            val col = ArrayList<Int>()
            for(i in 0 until h) {
                if(!v[i]) continue
                row.add(i)
                for(j in 0 until w) {
                    if(board[i][j] == '#') {
                        s.add(i to j)
                    }
                }
            }
            for(j in h until  h + w) {
                if(!v[j]) continue
                col.add(j-h)
                for(i in 0 until h) {
                    if(board[i][j-h] == '#') {
                        s.add(i to j - h)
                    }
                }
            }
            val remain = blkCnt - s.size
            if(remain == k) {
                return 1
            }
            return 0
        }
        return dfs(v.plus(true), cnt + 1) + dfs(v.plus(false), cnt + 1)
    }
    print(dfs(listOf(), 0))
}