let read f = stdin.ReadLine() |> f
let n = read int
let xs = stdin.ReadLine()

let mutable sum = 0
let mutable tmp = ' '
for x in xs do
    if tmp <> x then
        tmp <- x
        sum <- sum + 1

printfn "%d" sum