'use strict';
const main = input => {
  const n = parseInt(input[0]);
  const s = input[1];
  let arr = [];
  for (let i = 0; i < n; i++) {
    arr.push(s[i]);
  }
  // console.log(arr);
  
    for(let j=0; j<arr.length-1; j++) {
      if (arr[j] == arr[j+1]) {
        arr.splice(j, 1);
        j--;       
      }
      // console.log(arr);
    }

  console.log(arr.length);
  
}
main(require("fs").readFileSync("/dev/stdin", "utf8").split('\n'));