-- https://atcoder.jp/contests/abc173/tasks/abc173_c

import Control.Applicative
import Control.Monad
import Data.List

type Line = String
type Lines = [String]

-- white = '.'
black = '#'
red = '*'

fillRed :: Line -> Line
fillRed l = replicate (length l) red

fillLines :: Lines -> [Lines]
fillLines [line] = [[line], [fillRed line]]
fillLines (line:lines) = f line ++ f (fillRed line)
  where f l = map (l:) $ fillLines lines

countBlack :: Lines -> Int
countBlack = foldr ((+) . f black) 0
  where f x = foldr ((+) . (\y -> if x == y then 1 else 0)) 0

main :: IO ()
main = do
  [h, w, k] <- map read . words <$> getLine
  ls <- replicateM h getLine
  let filledPatterns = concatMap (map transpose . fillLines . transpose) $ fillLines ls
  print . length $ filter (\x -> countBlack x == k) filledPatterns
