import Data.List

main = do
  li <- getLine
  let [h,w,k] = map read $ words li
  co <- getContents
  let ls = lines co
  print $ compute h w k ls

compute :: Int -> Int -> Int -> [String] -> Int
compute h w k ls = length
  [ ()
  | hcs <- enumu h
  , let ls1 = transpose [ l | (b,l) <- zip hcs ls, b ]
  , k <= (length $ filter ('#' ==) $ concat ls1)
  , wcs <- enumu w
  , let ls2 = [ l | (b,l) <- zip wcs ls1, b ]
  , k == (length $ filter ('#' ==) $ concat ls2)
  ]

enumu 0 = [ [] ]
enumu n = [ b:bs | b <- [False,True], bs <- enumu (pred n) ]
