defmodule Main do
  def main do
    use Bitwise
    [w,h,k]=IO.gets("") |> String.split() |> Enum.map(&String.to_integer(&1))

    m=IO.stream(:stdio, :line) 
    |> Enum.take(w)
    |> Enum.map(&String.trim(&1))

    count=
    Enum.map(Enum.to_list(0..(1 <<< h)-1), fn x -> 
      Enum.map(Enum.to_list(0..(1 <<< w)-1), fn y ->
        brack=
        Enum.map(Enum.to_list(0..(h-1)), fn i -> 
          Enum.map(Enum.to_list(0..(w-1)), fn j ->
            ((((x>>>i)&&&1)==0)&&((y>>>j)&&&1)==0)&&check(m, i,j)
            end
          )
          end
        )
        |>List.flatten()
        |>Enum.count(fn x-> x==true end)
        brack==k
        end
      )
      end
    )
    |>List.flatten()
    |>Enum.count(fn x-> x==true end)

    IO.puts(count)
  end

  def check(m,i,j) do
    e=elem(List.pop_at(m, j),0)
    |> String.at(i)
    e=="#"
  end
 
end
