open System
open System.Linq;


let N=stdin.ReadLine()|>int
let S=stdin.ReadLine()

[<EntryPoint>]
let sf argv =
    let mutable ans=1
    for i in [1..N-1] do
        ans <- if S.[i]<>S.[i-1] then ans+1 else ans
    printfn "%d" ans
    0 