
function main(input = "") {
    const lines = input.split("\n");
    const arr = lines[0].split(" ").map((v) => (0 | v));
    const H = arr[0], W = arr[1], K = arr[2];
    const GRID = lines.slice(1).join("").split("").map((v) => (v === "#" ? 1 : 0));

    let res = 0;
    for (let i = 0; i < 2 ** H; i++) {
        for (let k = 0; k < 2 ** W; k++) {
            let grid = GRID.slice();
            for (let r = 0; r < H; r++) {
                if (i & (1 << r)) {
                    for (let ir = 0; ir < W; ir++) {
                        grid[ir + r * W] = 0;
                    }
                }
            }
            for (let c = 0; c < W; c++) {
                if (k & (1 << c)) {
                    for (let ic = c; ic < grid.length; ic += W) {
                        grid[ic] = 0;
                    }
                }
            }
            let cnt = grid.reduce((p,c)=>(p+c));
            if(cnt === K){
                res++;
            }
        }
    }
    return res;
}

//******************************
exports.main = main;

function Main(input) {
    console.log(main(input.trim()));
}

if (process.argv[2] !== "test") {
    Main(require("fs").readFileSync("/dev/stdin", "utf8"));
}