io = STDIN
h,w,k=io.gets.split.map(&:to_i)
board=h.times.map{io.gets.chomp}
ans=0
[0,1].repeated_permutation(h+w) do |mask|
  cnt=0
  mask[0,h].each_with_index do |mh,i|
    mask[h,w].each_with_index do |mw,j|
      cnt+=1 if board[i][j]=="#" && mh==0 && mw==0 
    end
  end
  (ans+=1) if cnt==k
end
puts ans
