function Main (input) {
  input = input.split("\n");
  var N = parseInt(input[0], 10);
  var S = input[1].split("");
  var ans = [S[0]];
  for (var i = 1; i < N; i++) {
    if (S[i] != ans[ans.length-1]) {
      ans.push(S[i]);
    }
  }
  console.log(ans.length);
}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));