const input = require("fs").readFileSync("/dev/stdin", "utf8")

;(input => {

    const lines = input.split('\n')
    const [H, W, K] = lines[0].split(" ").map(Number)
    lines.shift()

    const createMap = () => {
        const map = Array(H).fill([])
        for (let h = 0; h < H; h++) {
            map[h] = lines[h].split("")
        }
        return map
    }

    const c = (map) => {
        let count = 0
        for (let i = 0; i < H; i++) {
            for (let j = 0; j < W; j++) {
                if (map[i][j] === '#') {
                    count++
                }
            }
        }
        return count
    }
    const OH = (map, h) => {
        if (!h) {
            return map
        }
        for (let i = 0; i < W; i++) {
            map[h - 1][i] = '*'
        }
        return map
    }
    const OW = (map, w) => {
        if (!w) {
            return map
        }
        for (let i = 0; i < H; i++) {
            map[i][w - 1] = '*'
        }
        return map
    }

    let count = 0
    const P = Math.pow(2, H + W)
    for (let i = 0; i < P; i++) {
        const map = createMap()
        for (let j = 0; j < H; j++) {
            const h = i & Math.pow(2, j) ? j + 1 : 0
            OH(map, h)
        }
        for (let j = 0; j < W; j++) {
            const w = i & Math.pow(2, H + j) ? j + 1 : 0
            OW(map, w)
        }
        if (c(map) === K) {
            count++
        }
    }

    console.log(count)

})(input)
