const byteToDigits = (byte) => {
  let digit = 0
  const digits = {}

  while (byte > 0) {
    if (byte % 2 === 1) {
      digits[digit] = true
    }

    byte = Math.floor(byte / 2)
    digit++
  }
  
  return digits
}

const blackCellCount = (c, redRows, redColumns) => {
  let count = 0
  c.forEach((cells, i) => {
    cells.forEach((cell, j) => {
      if (c[i][j] === '#' && !redRows[i] && !redColumns[j]) {
        count++
      }
    })
  })
  
  return count
}

const main = async () => {
  const input = require('fs').readFileSync('/dev/stdin', 'UTF-8').trim()
  const rows = input.split('\n')
  const hwk = rows.shift()
  const [h, w, kString] = hwk.split(' ')
  const k = Number(kString)
  
  const c = []
  
  rows.forEach((row, i) => {
    c[i] = []
    const cells = row.split('')
    
    cells.forEach((cell, j) => {
      c[i][j] = cell
    })  
  })
 	
  // 全ての h, w の true/false の組み合わせを作る → ビット
  const hByteMax = Math.pow(2, h)
  const wByteMax = Math.pow(2, w)

  let count = 0

  for (let hByte = 0; hByte < hByteMax; hByte++) {
    const redRows = byteToDigits(hByte)

    for (let wByte = 0; wByte < wByteMax; wByte++) {
      const redColumns = byteToDigits(wByte)
      
      if (blackCellCount(c, redRows, redColumns) === k) {
        count++
      }
    }
  }

  console.log(count)
}

main()