const processData = (lines) => {
    let acc = 0
    const [h, w, k] = lines[acc].split(' ').map(x => +x)
    acc++
    let arr = []
    const rowsBlack = []
    const columnsBlack = []
    let total = 0
    for (let i=0; i<h; i++) {
        const t = lines[acc++].split('')
        arr.push(t)
        let rowCount = 0
        for (let j=0; j<t.length; j++) {
            if (t[j] === '#') {
                rowCount++
                total++
            }
        }
        rowsBlack.push(rowCount)
    }

    for (let i=0; i<w; i++){
        let sum = 0
        for (let j=0; j<h; j++) {
            if (arr[j][i] === '#')
                sum++
        }
        columnsBlack.push(sum)
    }

    let count = 0

    // console.log(columnsBlack)
    // console.log(rowsBlack)
    // console.log(total)


    for (let i=0; i<arr.length; i++) {
        for (let j=0; j<arr[i].length; j++) {

            let possibleCount = total - rowsBlack[i] - columnsBlack[j]
            if (arr[i][j] === '#') {
                possibleCount++
            }
            // console.log(i, j, possibleCount)
            if (possibleCount === k) {
                count++
            }
        }
    }

    for (const t of rowsBlack) {
        if (total - t === k)
            count++
    }

    for (const t of columnsBlack) {
        if (total - t === k)
            count++
    }

    if (total === k) {
        count++
    }

    console.log(count)
}

let i = ''
process.stdin.on('data', c => i += c)
process.stdin.on('end', () => {
    const {EOL} = require('os')
    const lines = i.split(EOL) /*your input text, split by lines*/
    processData(lines)
})
