let scan_int () = Scanf.scanf " %d" (fun x -> x)
let scan_string () = Scanf.scanf " %s" (fun x -> x)
let scan_array len read_func = Array.init len (fun _ -> read_func())
let print_int n = Printf.printf "%d\n" n

let () =
  let n = scan_int() and s = scan_string() in
  let rec solve i n ret =
    if (i+1) = n then ret
    else
      if s.[i] <> s.[i+1] then solve (i+1) n (ret+1)
      else solve (i+1) n ret in
  print_int (solve 0 n 1)
