const main = (input) => {
  const args = input.split('\n')
  const hwk = args.shift().split(' ').map(v => Number(v))
  const map = args.map(v => v.split(''))
  let sum = 0
  for (let i = 0; i < 2 ** hwk[0]; i++) {
    let filled_map = map
    for (let k = 0; k < hwk[0]; k++) {
      if((i >> k) & 1 === 1) {
        filled_map = filled_map.map((l, index) => index === k ? l.map(_ => 'r') : l)
      }
    }
    for (let j = 0; j < 2 ** hwk[1]; j++) {
      for (let l = 0; l < hwk[1]; l++) {
        if((j >> l) & 1 === 1) {
          filled_map = filled_map.map(v => v.map((v, index) => index === l ? 'r' : v))
        }
      }
      const count = filled_map.flat().filter(v => v === '#').length
      if (count === hwk[2]) {
        sum++
      }
    }
  }
  console.log(sum)
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'))