def deep_copy(a)
  Marshal.load(Marshal.dump(a))
end

def change(h,w)
  c=deep_copy(C)
  H.times do |i|
    next if h[i].zero?
    W.times do |j| c[i][j]=?R end
  end
  W.times do |j|
    next if w[j].zero?
    H.times do |i| c[i][j]=?R end
  end
  c.flatten.join
end

H,W,K=gets.split.map(&:to_i)
C=H.times.map{gets.chop.chars}
res=[]
0.upto(2**H) do |h|
  0.upto(2**W) do |w|
    r=change(h,w)
    res<<r if K==r.count(?#)
  end
end
p res.uniq.size
