object Main extends App {
 val n = readInt
 val s = readLine
 var num = 1
 var i = 1
 var crrentChar = s.charAt(0)
 while(i < n) {
  if(crrentChar != s.charAt(i)) {
    crrentChar = s.charAt(i)
    num += 1
  }
  i += 1   
 }
    
 println(num)  
  
}