import scala.io.StdIn
import scala.collection.mutable

object Main extends App {
  val n = StdIn.readLine().toInt
  val s: String = StdIn.readLine()
  var prev = s(0)

  val ans = s.foldLeft(1) { (acc, v) =>
    if (prev != v) {
      prev = v
      acc + 1
    } else {
      acc
    }
  }

  println(ans)
}
