main :: IO()
main = do
    getLine
    str <- getLine
    print $ solve str


solve :: String -> Int
solve str
    | length str <= 1				= 0
    | take 2 str == "#."			= 1 + (solve $ tail str)
    | otherwise						= solve $ tail str