"use strict";

main(require("fs").readFileSync("/dev/stdin", "UTF-8"));

function main(input) {
  input = input.split("\n");

  const slimes_num = parseInt(input[0]);
  let slimes_color = input[1].split("");

  for (let i = 0; i < slimes_color.length - 1; i++) {
    if (slimes_color[i] === slimes_color[i + 1]) {
      slimes_color[i] = "";
    }
  }

  let result = slimes_color.filter(c => c !== "");
  console.log(result.length);
}
