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           Text.Printf

main :: IO ()
main = do
  _ <- getLine
  s <- getLine
  print $ min (length . elemIndices '#' . dropWhile (== '#') $ s) (length . elemIndices '#' $ s)
