module Main where
import Control.Monad
import Data.List

myPrint :: [String] -> String -> String
myPrint s p = unwords [p, "x", show $ sum [1 | x<-s, x==p]]

count :: Int -> Int -> [String] -> [Int] -> [Int] -> Int
count h w s rs cs = length [() | i<-[0..h-1], j<-[0..w-1], notElem i rs && notElem j cs && s !! i !! j == '#']

main :: IO ()
main = do
    [h, w, k] <- map read . words <$> getLine 
    s <- replicateM h getLine
    print $ length [() | rs<-subsequences [0..h-1], cs<-subsequences [0..w-1], count h w s rs cs == k]