#!/usr/bin/env ruby
require 'set'

H, W, K = gets.chomp.split.map(&:to_i)

C = []
H.times do |i|
  C[i] = gets.chomp.codepoints
end

BLACK = '#'.ord
WHITE = '.'.ord

result = 0

0.upto(H) do |h|
  hcomb = (0...H).to_a.combination(h)

  0.upto(W) do |w|
    wcomb = (0...W).to_a.combination(w)

    hcomb.each do |hc|
      wcomb.each do |wc|
        count = 0

        hc.each do |hi|
          wc.each do |wi|
            count += 1 if C[hi][wi] == BLACK
          end
        end

        result += 1 if count == K
      end
    end
  end
end

puts result
