# frozen_string_literal: true

H, W, K = gets.chomp.split.map(&:to_i)
board = H.times.map do
  gets.chomp.split('')
end

def copy(board)
  board.map(&:dup)
end

def count_black(board)
  ans = 0
  board.each do |line|
    line.each do |block|
      ans += 1 if block == '#'
    end
  end
  ans
end

def paint(board, yoko_count, tate_count)
  ans = 0
  (0..(W - 1)).to_a.combination(yoko_count) do |gyo|
    (0..(H - 1)).to_a.combination(tate_count) do |retu|
      copied = copy board
      gyo.each do |x|
        (0..H - 1).each do |y|
          copied[y][x] = 'r'
        end
      end
      retu.each do |y|
        copied[y].each_with_index do |_, x|
          copied[y][x] = 'r'
        end
      end
      ans += 1 if (count_black copied) == K
    end
  end
  ans
end

count = 0

(0..H).each do |yoko_count|
  (0..W).each do |tate_count|
    count += paint(board, yoko_count, tate_count)
  end
end

puts count
