main = do
    n <- readLn
    s <- getLine
    print $ naive n s

naive :: Int -> String -> Int
naive n s = minimum (map (diff s) (lists n))
    where
        diff :: Eq a => [a] -> [a] -> Int
        diff ls ms = length [1 | (x,y)<-zip ls ms, x/=y]
        lists n = [replicate l '.' ++ replicate (n-l) '#' | l<-[0..n]]

