let f (str: string) =
    let mutable i = 1
    let mutable count = 0
    while i < str.Length do
        if str.[i] <> str.[i - 1]
            then count <- count + 1
        i <- i + 1
    count + 1

stdin.ReadLine() |> ignore
let input = stdin.ReadLine()
let ans = f input

printfn "%d" ans