import           Control.Monad
import           Data.List

main :: IO ()
main = do
  [h, w, k] <- map read . words <$> getLine
  m <- getMat h
  print $ length [ 1 | rows <- subsequences [0..h-1],
                       cols <- subsequences [0..w-1],
                       numberBlack (paint rows cols m h w) == k ]

getMat 0 = return []
getMat i = do
  s <- getLine
  r <- getMat $ i - 1
  return $ s:r

numberBlack m =
  sum $ map (length . filter (== '#')) m

paint rows cols m h w =
  [ [ if i `elem` rows || j `elem` cols then '.' else m !! i !! j | j <- [0..w-1]] | i <- [0..h-1]]
