h,w,n = gets.split.map(&:to_i)
lis = []
for i in 0...h do
  s = gets.chomp.chars
  lis.push(s)
end
ans = 0
for i in 0...2**h do
  for j in 0...2**w do
    cnt = 0
    for k in 0...h do
      for l in 0...w do
        if (i&(2**k)==2**k) && (j&(2**l)==2**l) && (lis[k][l]=='#')then
          cnt +=1
        end
      end
    end
    if cnt==n then
      ans += 1
    end
  end
end
puts ans