module Main where

import           Control.Monad
import           Data.List
import           Data.Ord
import           Data.List.Split
import           Data.Array.IO
import qualified Data.Vector            as V
import           Data.Maybe
import           Text.Printf

main :: IO ()
main = do
  _ <- getLine
  s <- V.fromList <$> getLine
  as <- forM [0 .. V.length s] $ \x ->
    return $ (V.length . V.elemIndices '#' $ V.take x s) + (V.length . V.elemIndices '.' $ V.drop x s)
  print $ minimum as
