import Control.Monad
import Control.Applicative
import Data.List


main :: IO()
main = do
  n <- readLn :: IO Int
  s <- getLine
  let (a, b) = (foldl (\(acc1, acc2)  -> \(i, x) -> if i `mod` 2 == 0 then (acc1 + length x, acc2) else (acc1, acc2 + length x)) (0, 0) . (zip [0..]) . group ) s
  let ans = min a b
  print ans
