#!/usr/bin/env ruby
@h, @w, @k = gets.chomp.split.map(&:to_i)
@c = []

@h.times do
  @c << gets.chomp.split('')
end

@ans = 0
def check(arr)
  black_num = 0

  @h.times do |i|
    next if arr[i] == 0
    @w.times do |j|
      next if arr[@h + j] == 0
      black_num += 1 if @c[i][j] == '#'
    end
  end
  @ans += 1 if black_num == @k
end

def dfs(arr, n)
  return check(arr) if arr.length == n

  dfs(arr + [0], n)
  dfs(arr + [1], n)
end

dfs([], @w + @h)

puts @ans
