func main() {
let s = readLine()!.split(separator: " ").map{ Int($0)! }
let h = s[0]
let w = s[1]
let k = s[2]

var map = Array(repeating: Array(repeating: false, count: w), count: h)

for i in 0..<h {
	let sts = readLine()!
	var m = 0
	for st in sts {
		if st == "#" {
			map[i][m] = true
		}
		m += 1
	}
}

let maxrow = pow(2, h)
let maxcol = pow(2, w)
var c = 0
for ri in 0..<maxrow {
	let rtf = gentf(ri, h)
	for ci in 0..<maxcol {
		let ctf = gentf(ci, w)
		var cou = 0
		for ai in 0..<h {
			for bi in 0..<w {
				if map[ai][bi] == true && rtf[ai] && ctf[bi] {
					cou += 1
				}
			}
		}
		if cou == k { c += 1 }
	}
}
print(c)
}

main()
func pow(_ source: Int, _ count: Int) -> Int {
	var n = 1
	for _ in 0..<count {
		n *= source
	}
	return n
}
func gentf(_ n: Int, _ len: Int) -> [Bool] {
	let bin = String(n, radix: 2)
	var tf = Array(repeating: false, count: len)
	var i = len - bin.count
	for b in bin {
		if b == "1" { tf[i] = true }
		i += 1
	}
	return tf
}
