solve :: String -> String
solve [s1] = [s1]
solve (s1:s2:ss)
  | s1 == s2 = solve (s1:ss)
  | otherwise = s1 : solve (s2:ss)

main :: IO ()
main = do
  getLine
  s <- getLine
  print . length $ solve s