import Control.Monad
import Data.Maybe
import qualified Data.ByteString.Char8 as BS
import Data.List
import Data.Array

readInt = fst . fromJust . BS.readInt
readIntList = map readInt . BS.words
getInt = readInt <$> BS.getLine
getIntList = readIntList <$> BS.getLine

main = do
    [h,w,k] <- getIntList
    cs <- array ((1,1),(h,w)) . zip [(i,j)|i <- [1..h], j <- [1..w]] . filter (/= '\n') <$> getContents
    let htfs = sequence $ replicate h [False, True]
    let wtfs = sequence $ replicate w [False, True]
    let count cs htf wtf = length $ filter (== '#') [ cs ! (i,j) | i <- [1..h], j <- [1..w], htf !! (i-1), wtf !! (j-1)]
    let ans = length $ filter (== k) [count cs htf wtf| htf <- htfs, wtf <- wtfs]
    print ans