let HWK: [Int] = readLine()!.split(separator: " ").map { Int($0)! }
let cs: [[Int]] = (1...HWK[0]).map { _ in readLine()!.map { $0 == "#" ? 1 : 0 } }
var res: Int = 0

var W: Int = 1
for _ in 0..<HWK[0] + HWK[1] { W *= 2 }

for bit in 0..<W {
    var temp = cs
    var num2 = String(bit, radix: 2)
    num2 = String(repeating: "0", count: HWK[0] + HWK[1] - num2.count) + num2
    var bCount = 0
    
    for (k, opt) in num2.enumerated() {
        if opt == "0" {
            if k < HWK[0] {
                let i = k
                temp[i] = Array(repeating: 0, count: HWK[1])
            } else {
                let j = k - HWK[0]
                for i in 0..<HWK[0] { temp[i][j] = 0 }
            }
        }
    }
    for i in 0..<HWK[0] {
        bCount += temp[i].reduce(0, +)
    }
    if bCount == HWK[2] { res += 1}
}
print(res)  // (๑•ૅㅁ•๑)