def count_black(c)
  count = 0
  c.each do |cc|
    count += cc.select { |item| item == '#' }.length
  end
  
  count
end

def fill_and_count_black(c, xs, ys)
  temp = Marshal.dump(c)
  cc = Marshal.load(temp)

  xs.each do |i|
    a = cc[i].length
    a.times do |j|
      cc[i][j] = 'a'
    end
  end

  ys.each do |i|
    a = cc.length
    a.times do |j|
      cc[j][i] = 'a'
    end
  end
  


  count = count_black(cc)
  
  #p xs
  #p ys
  #pp cc
  #p count
  #p ''
  
  count
end

h, w, k = gets.chomp.split(' ').map(&:to_i)

c = []
h.times do |i|
  c[i] = gets.chomp.split('')
end

xs = []
h.times { |i| xs << i }
ys = []
w.times { |i| ys << i }


count = 0
count += 1 if count_black(c) == k


h.times do |i|
  xs.combination(i + 1).to_a.each do |xxs|
    count += 1 if fill_and_count_black(c, xxs, []) == k
  end
end

w.times do |j|
  ys.combination(j + 1).to_a.each do |yys|
    count += 1 if fill_and_count_black(c, [], yys) == k
  end
end

h.times do |i|
  xs.combination(i + 1).to_a.each do |xxs|
    w.times do |j|
      ys.combination(j + 1).to_a.each do |yys|
        count += 1 if fill_and_count_black(c, xxs, yys) == k
      end
    end
  end
end

puts count
