open System
let R T = stdin.ReadLine()|> T
let RS T = stdin.ReadLine().Split()|>Array.map T
let R2 T U = RS string|>fun c-> (c.[0]|>T),(c.[1]|>U)
let R3 T U V = RS string|>fun c-> (c.[0]|>T),(c.[1]|>U),(c.[2]|>V)
let R4 T U V W = RS string|>fun c-> (c.[0]|>T),(c.[1]|>U),(c.[2]|>V),(c.[3]|>W)
let R5 T U V W X = RS string|>fun c-> (c.[0]|>T),(c.[1]|>U),(c.[2]|>V),(c.[3]|>W),(c.[4]|>X)
[<EntryPoint>]
let main argv =
    let H,W,K=R3 int int int
    let map = [|for i in [1..H] do yield (R string)|]
    let bit x i = ((x>>>i)&&&1)<>0
    let mutable ans = 0
    for a in [0..(1<<<H)-1] do
        for b in [0..(1<<<W)-1] do
            if ([0..H-1]|>Seq.sumBy(fun c -> if (bit a c) then 0 else ([0..W-1]|>Seq.sumBy(fun d -> if ((bit b d)||(map.[c].[d]='.')) then 0 else 1))))=K then
                ans <- ans+1
    printfn "%d" ans
    0