'use strict';

function Main(input) {
    const tmp = input.trim().split('\n');
    const [H, W, K] = tmp[0].split(' ').map((v) => Number(v));
    let [_, ...C] = tmp;
    C = C.reduce((str, v) => (str += v), '')
        .split('')
        .map((v) => (v === '#' ? 0 : 1));

    const masks = createMasks(H, W);

    let answer = 0;
    for (const mask of masks) {
        const maskedArray = C.map((v, i) => mask[i] | v);
        if (K === maskedArray.filter((v) => v === 0).length) {
            answer += 1;
        }
    }

    console.log(String(answer));
    return;
}

function createMasks(height, width) {
    const masks = [];
    for (let y = 0; y < 2 ** height - 1; y++) {
        const row = y.toString(2).padStart(height, 0);
        for (let x = 0; x < 2 ** width - 1; x++) {
            const col = x.toString(2).padStart(width, 0);
            masks.push(correctMask(row, col));
        }
    }
    return masks;
}

function correctMask(row, col) {
    const mask = [];
    for (let y = 0; y < row.length; y++) {
        for (let x = 0; x < col.length; x++) {
            mask.push(Number(row[y]) | Number(col[x]));
        }
    }
    return mask;
}

Main(require('fs').readFileSync('/dev/stdin', 'utf8'));