"use strict"

let arg_str = require('fs').readFileSync('/dev/stdin', 'UTF-8')
arg_str = arg_str.split('\n')
const N = +arg_str[0]
const S_array = arg_str[1].split('')

let sum = 1
let current = S_array[0]
for(let i=1;i<N;i++){
  if(current != S_array[i]){
    current = S_array[i]
    sum++
  }
}

console.log(sum)