[<AutoOpen>]
module Program

open System

let read f = stdin.ReadLine() |> f
let reada f = stdin.ReadLine().Split() |> Array.map f
let reads f = stdin.ReadLine().Split() |> Array.toList |> List.map f

let rec solve a x = function
    | [] -> a + 1
    | y :: ys ->
        if x = y then
            solve a x ys
        else
            solve (a + 1) y ys

[<EntryPoint>]
let main _ =
    let N = read int
    let S = read string |> fun s -> s.ToCharArray()
    let bs = List.ofArray S
    solve 0 (List.head bs) (List.tail bs)
    |> printfn "%i"
    0