import Data.List(findIndex)

main = do
    _ <- getLine
    s <- getLine
    let res = case findIndex (=='#') s of
                Nothing -> 0
                Just n -> length $ filter (=='.') $ drop n s
    print res
