import java.util.*
fun getValue(from:Int, to:Int) : Long{
    var result = 0L
    repeat(36){
        if(35 - it <= to && 35 - it >= from){
            result = result.shl(1) or 0
        }
        else {
            result = result.shl(1) or 1
        }
    }
    return result
}

fun getVertical(column : Int, h : Int, w : Int) : Long {
    var result =0L
    repeat(h*w){
        val modValue = it % w
        if(modValue == column){
            result  = result.shl(1) or 0
        }
        else {
            result = result.shl(1) or 1
        }
    }
    return result
}

fun countOne(value : Long) : Int {
    var result = 0
    var countValue = value

    while(countValue > 0){
        val checkValue = countValue.and(1L)
        if(checkValue > 0){
            result += 1
        }
        countValue = countValue.shr(1)
    }
    return result
}

fun main(args: Array<String>) {
    val reader = Scanner(System.`in`)
    val H = reader.nextInt()
    val W = reader.nextInt()
    val K = reader.nextInt()
    var value = 0L

    repeat(H){
        val line = reader.next()
        line.forEach {
            value = value.shl(1).or(if(it == '.') 0 else 1)
        }
    }

    //println(value)
    var results = mutableListOf<Long>()
    results.add(value)
    repeat(H){
        val value = getValue(it*W, it * W + W - 1)
        val changed = results.map { it.and(value) }
        results.addAll(changed)
    }
    //println(results)
    repeat(W){
        val value = getVertical(it, H, W)
        //println(value)
        val changed = results.map{it.and(value)}
        results.addAll(changed)
    }

    //println(results)
    //println(results.filter { countOne(it) == K })
    println(results.filter { countOne(it) == K }.size)
}