count :: [Char] -> Int
count s = length $ foldl step [] s
    where step [] a = [a]
          step x@(b:_) a = if a == b then x else (a:x)

main = do
  n <- readLn :: IO Int
  s <- getLine :: IO String
  putStrLn $ show $ count s
