def check(bc,hw)
  if hw == $h + $w
    return
  elsif hw == $h
    $d = $c.map{|e| e.chars}.transpose.map{|e| e.join("")}
  end
  if hw < $h
    cc = $c[hw].count('#')
  else
    cc = $d[hw-$h].count('#')
  end
  if bc - cc >= $k
    if bc - cc == $k
      $ans += 1
    end
    if hw < $h
      $c[hw].tr!('#','*')
    else
      $d[hw-$h].tr!('#','&')
    end
    check(bc-cc,hw+1)
    if hw < $h
      $c[hw].tr!('*','#')
    else
      $d[hw-$h].tr!('&','#')
    end
  end
  check(bc,hw+1)
end

$h, $w, $k = gets.strip.split.map(&:to_i)
$c = []
bmax = 0
$h.times do
  t = gets.strip
  $c.push t
  bmax += t.count('#')
end

if bmax == $k
  $ans = 1
else
  $ans = 0
end
if bmax >= $k
  check(bmax,0)
end
p $ans
