let inputs = readLine()!.split(separator: " ").map { Int($0)! }
let H = inputs[0] 
let W = inputs[1]
let K = inputs[2]
var grid: [[Character]] = .init(repeating: .init(repeating: Character("@"), count: W), count: H)

for row in 0..<H {
  grid[row] = Array(readLine()!)
}

var ans = 0
for h in 0..<1<<H {
  for w in 0..<1<<W {
    var black = 0
    for i in 0..<H {
      for j in 0..<W {
        if h & (1<<i) == 0 && w & (1 << j) == 0 && grid[i][j] == "#" {
          black += 1
        }
      }
    }
    ans += black == K ? 1 : 0
  }
}
print(ans)