function C173(_input) {
    var lines = _input.split("\n");
    var [height, width, num] = lines.shift().split(' ').map(v => v*1);
    var result = 0;

    for (let is = 0; is < 1<<height; is++) {
        for (let js = 0; js < 1<<width; js++) {
            let count = 0;
            for (let i = 0; i < height; i++) {
                for (let j = 0; j < width; j++) {
                    if (is>>i&1) continue;
                    if (js>>j&1) continue;
                    if (lines[i][j] === '#') {
                        count++;
                    }
                }
            }
            if (count !== num) continue;
            result++;
        }
    }

    console.log(result);
}
C173(require("fs").readFileSync("/dev/stdin", "utf8"));