console.log((args=>{
  const [HWK,...tmp] = args.trim().split('\n');
  const [H,W,K] = HWK.split(' ').map(v=>v|0);
  const ha = 1 << H, wa = 1<< W;
  let count = 0;
  for ( let h = 0; h < ha; h++ ) {
    for ( let w = 0; w < wa; w++ ) {
      let b = 0;
      for ( let i = 0; i < H; i++ ) {
        if ( h & 1<<i ) continue;
        for ( let j = 0; j < W; j++ ) {
          if ( w & 1<<j ) continue;
          if ( tmp[i][j] === '#' ) b++;
        }
      }
      if ( b === K ) count++;
    }
  }
  return `${count}`;
})(require('fs').readFileSync('/dev/stdin', 'utf8')));