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 < hwk[0]; i++) {
    for (let j = 0; j < hwk[1]; j++) {
      let filled_map = map.map((l,index) => index === i ? l.map(_ => 'r') : l)
      filled_map = filled_map.map(v => v.map((v, index) => index === j ? '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'))