let split_string ?(pattern="") = Str.split @@ Str.regexp pattern
let h, w, k = Scanf.sscanf (read_line ()) "%d %d %d" @@ fun h w k -> (h, w, k)
let c = Array.init h @@ fun _ -> read_line () |> split_string |> Array.of_list

let rec pow x n = if n = 1 then x else x * pow x (n - 1)

let rec to_array acc n = function
  | 0 -> Array.of_list acc
  | i -> to_array ((n mod 2 = 1) :: acc) (n / 2) (i - 1)
let to_array =  to_array []

let count rows columns =
  let cnt = ref 0 in
  for i = 0 to h - 1 do
    for j = 0 to w - 1 do
      if (not rows.(i)) && (not columns.(j)) && c.(i).(j) = "#" then
        incr cnt
    done
  done;
  !cnt

let () =
  let ans = ref 0 in
  let a, b = pow 2 h, pow 2 w in
  for i = 0 to a - 1 do
    for j = 0 to b - 1 do
      if count (to_array i h) (to_array j w) = k then
        incr ans
    done
  done;
  Printf.printf "%d\n" !ans