program main
  implicit none
  integer i, H, W, K, j, ans, l, m, s, v
  integer,allocatable :: G(:,:), G0(:,:)
  character(6) c
  read(*, *)H, W, K
  allocate(G(H,W))
  allocate(G0(H,W))
  do i = 1,H
    read(*, *) c
    do j = 1,W
      if (c(j:j) == '.') then
        G0(i,j) = 0
      else if (c(j:j) == '#') then
        G0(i,j) = 1
      end if
    end do
  end do

  ans = 0

  do i = 0,2**(H + W)-1
    s = i
    G = G0
    v = H + W -1
    do j = 1,H
      if (s >= 2**v) then
        do l = 1,W
          G(j,l) = 0
        end do
        s = s-2**v
      end if
      v = v-1
    end do
    do j = 1, W
      if (s >= 2**v) then
        do l = 1,H
          G(l,j) = 0
        end do
        s = s-2**v
      end if
      v = v-1
    end do
    m = sum(G)
    !write(*, *) G
    if (m == K) then
      ans = ans + 1
    end if
  end do
  !read(*, *) (L(i), i = 1,N)

  write(*, *) ans
end program main
