H, W, K = $stdin.gets.split.map {|i| i.to_i }
map = []
0.upto(H - 1) do |h|
  map[h] = $stdin.gets.strip.split(//).map do |c|
    case c
    when '.'; 0
    when '#'; 1
    end
  end
end

def info(*s)
  #$stderr.puts s.join
end

map.each do |row|
  info row
end

total = 0
0.upto((1 << H) - 1) do |hmask|
  0.upto((1 << W) - 1) do |wmask|
    info "Hmask: #{hmask} / Wmask: #{wmask}"
    k = 0
    0.upto(H - 1) do |h|
      hf = 1 << h
      hm = hf & hmask
      info "H: #{h} / #{hf} & #{hmask} = #{hm}"
      next if hm != 0
      0.upto(W - 1) do |w|
        wf = 1 << w
        wm = wf & wmask
        info "W: #{w} / #{wf} & #{wmask} = #{wm}"
        next if wm != 0
        k += map[h][w]
      end
    end
    if K == k
      total += 1
    end
    info "K = #{k} / total = #{total}"
  end
end

puts total
