func bitAllSearch(from value: Int) -> [[Int]] {
    (0..<(1<<value)).reduce([[Int]]()) { result, bit in
        result + [(0..<value).reduce([Int]()) {
            if bit & 1<<$1 != 0 {
                return $0 + [$1]
            } else {
                return $0
            }
        }]
    }
}

func character(string: String, of index: Int) -> Character {
    let i = string.index(string.startIndex, offsetBy: index)
    return string[i]
}

let firstLine = readLine()!.split(separator: " ").compactMap { Int($0) }
let h = firstLine[0]
let w = firstLine[1]
let k = firstLine[2]

let chwList = (1...h).map { _ in readLine()! }
let hBitList = bitAllSearch(from: h)
let wBitList = bitAllSearch(from: w)

var result = 0
hBitList.forEach { hBits in
    wBitList.forEach { wBits in
        var total = 0
        hBits.forEach { hBit in
            wBits.forEach { wBit in
                if character(string: chwList[hBit], of: wBit) == "#" {
                    total += 1
                }
            }
        }
        if total == k {
            result += 1
        }
    }
}
print(result)
