function main(input){
  input = input.split('\n');
  var N = Number(input[0]);
  var S = input[1];
  
  var tmp = '';
  var result = '';
  for(var i = 0;i < N;i++){
  	if(tmp !== S[i]){
      result += S[i];
    }
    tmp = S[i];
  }
  console.log(result.length);
  
}

main(require('fs').readFileSync('/dev/stdin','utf8'));