kr :: String -> String
kr [] = []
kr [i] = [i]
kr (i:j:x) = if i == j then kr (i:x) else i: kr (j:x)

main = do
    ns <- getLine
    s <- getLine
    let n = read ns :: Int
    print $ length $ kr s
