object Main extends App {
  val input1 = readLine
  val input2 = readLine
  val N = input1
  var count = 0
  var lastChar: Char = ' '
  input2.foreach(s => {
    if (s != lastChar) count += 1; lastChar = s
  })
  println(count)
}