main = do
    _ <- getLine
    s <- getLine
    putStrLn $ show $ solve s '.'

solve :: String -> Char -> Int
solve [] _ = 0
solve (x:xs) y = if x == '.' && y == '#' then 1 + solve xs '#' else solve xs x
