"use strict"
function Main(input) {
  input = input.trim().split('\n');
  const N = Number(input[0]);
  const S = input[1].split('');

  let tmp = '';
  let ret = 0;
  for(let i=0; i<N; i++){
    if(tmp === S[i]){
      ret += 1;
    }
    tmp = S[i];
  }
  console.log(N-ret);
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));