h, w, k = gets.chomp.split.map(&:to_i)
board = h.times.map { gets.chomp.chars }

ans = 0

(2 ** h).times do |n|
  # 塗られていない行
  rows = n.to_s(2).rjust(h).chars.map {|c| c != "1" }

  (2 ** w).times do |m|
    # 塗られていない列
    cols = m.to_s(2).rjust(w).chars.map {|c| c != "1" }

    count = 0
    # p [rows, cols]
    h.times do |i|
      w.times do |j|
        if rows[i] && cols[j] && board[i][j] == "#"
          count += 1
        end
      end
    end
    if count == k
      ans += 1
    end
  end
end

puts ans