lines = []
while line = gets
    lines << line.chomp.split(' ')
end

H = lines[0][0].to_i
W = lines[0][1].to_i
K = lines[0][2].to_i

ans = 0
for i in 0..2 ** (H+W) - 1 do   #i: bit
  black = 0
  for j in 1..H do
    for k in 1..W do
      if i[j-1] == 1 and i[H+k-1] == 1 and lines[j][0][k-1] == "#" then  #rest
        black += 1
      end
    end
  end
  if black == K then
    ans += 1
  end
end
    
puts ans