h, w, k = gets.split.map(&:to_i)
ary = []
h.times{
  ary << gets.chomp.split(//)
}

h_ary = []
w_ary = []
[0,1].repeated_permutation(h) do |i|
  h_ary << i
end
[0,1].repeated_permutation(w) do |i|
  w_ary << i
end

tmp = Marshal.load(Marshal.dump(ary))

ans = 0
h_ary.length.times do |i|
  w_ary.length.times do |j|
    h_ary[i].length.times do |k|
      if h_ary[i][k] == 1
        tmp[k].fill("*")
      end
    end
    w_ary[j].length.times do |l|
      if w_ary[j][l] == 1
        tmp.length.times do |m|
          tmp[m][l] = "*"
        end
      end
    end
    if tmp.flatten.count("#") == k
      ans += 1
    end
    tmp = Marshal.load(Marshal.dump(ary))
  end
end
p ans