let () =
  let _ = Scanf.sscanf (input_line stdin) "%d" (fun a -> a) in
  let s = input_line stdin in
  let n = ref 0 in
  let prev_c = ref ' ' in 
  let _ = String.iter (fun c -> if !prev_c  <> c then n := !n + 1; prev_c := c) s
  in
  print_int !n;
  print_newline ()
