input = readlines()
h, w, k = input.shift.chomp.split("\s").map{|x| x.to_i}

cells = {}

input.each_with_index do |l, ih|
  l.chomp.split('').each_with_index do |color, iw|
    cells[ih + 1] = {} if cells[ih + 1].nil?
    cells[ih + 1][iw + 1] = color == '.' ? 'white' : 'black'
  end
end

h_list = []
w_list = []

def addNext(tmp, lim)
  res = []
  if tmp.length == 0
    (1..lim).each do |n|
      res.push([n])
    end
  else
    tmp.each do |t|
      (1..lim).each do |n|
        n_tmp = t.clone
        n_tmp.push(n)
        res.push(n_tmp)
      end
    end
  end

  res
end

(1..h).each do |n|
  h_list = addNext(h_list, h)
end

h_uniq = ['0']
h_list.each do |l|
  targets = l.uniq.sort.join(',')
  h_uniq.push(targets) unless h_uniq.include?(targets)
end

(1..w).each do |n|
  w_list = addNext(w_list, w)
end

w_uniq = ['0']
w_list.each do |l|
  targets = l.uniq.sort.join(',')
  w_uniq.push(targets) unless w_uniq.include?(targets)
end

cnt = 0
h_uniq.each do |hl|
  h_targets = hl.split(',').map{|x| x.to_i}
  w_uniq.each do |wl|
    w_targets = wl.split(',').map{|x| x.to_i}
    bk_cnt = 0
    (1..h).each do |h_idx|
      (1..w).each do |w_idx|
        next if h_targets.include?(h_idx)
        next if w_targets.include?(w_idx)
        bk_cnt += 1 if cells[h_idx][w_idx] == 'black'
      end
    end
    cnt += 1 if bk_cnt == k
  end
end

puts cnt
