fun main(args: Array<String>) {
  var n = readLine()!!.toInt()
  val b = readLine()!!
  b.forEachIndexed { index, c ->
      if (index == b.length-1) {
          return@forEachIndexed
      }
      if (c == b[index + 1]) {
          n -= 1
      }
  }
  println(n)
}