func readIntArray() -> [Int] {
    readLine()!.split(separator: " ").map({Int($0)!})
}

let black: Character = "#"

let line = readIntArray()
let (H, W, K) = (line[0], line[1], line[2])
var c: [[Character]] = []

(0..<H).forEach({_ in c.append(Array(readLine()!))})

var ans = 0

for h in 0..<(1 << H) {
    for w in 0..<(1 << W) {
        var rem = 0
        
        for i in 0..<H {
            if ((h & 1 << i) > 0) {
                continue
            }
            for j in 0..<W {
                if ((w & 1 << j) > 0) {
                    continue
                }
                if (c[i][j] == black) {
                    rem += 1
                }
            }
        }
        
        if rem == K {
            ans += 1
        }
    }
}

print(ans)
