main :: IO ()
main = do
    [h, w, k] <- map read . words <$> getLine
    xs <- sequence $ replicate h getLine 
    let selects = [(hs, ws) | hs <- subs [1..h], ws <- subs [1..w]]
    let res = map (validate xs) selects
    putStrLn $ show $ count k res
        where
            validate xs (hs, ws) = 
                let rm1 = reduce 1 hs xs
                    rm2 = map (reduce 1 ws) rm1
                in count '#' $ concat rm2
            reduce _ _  [] = []
            reduce n hs (x:xs) = if n `elem` hs
                then reduce (n + 1) hs xs
                else x : reduce (n + 1) hs xs
            count _ [] = 0
            count y (x:xs) 
                | x == y = 1 + count y xs
                | otherwise = count y xs

subs :: [a] -> [[a]]
subs [] = [[]]
subs (x:xs) = yss ++ map (x:) yss
    where yss = subs xs
    