h,w,k=gets.split.map(&:to_i)
C=Array.new(h).map{Array.new(w,0)}
for i in 0..h-1
  C[i]=gets.chomp.split("").map(&:chomp)
end
c=0
(1<<h).times{|v|
(1<<w).times{|w|
b=0
h.times{|i|
w.times{|j|
b+=1 if C[i][j]=="#" && (v[i]==1 && w[j]==1)
}
}
c+=1 if b==k
}
}
p c
