object Main {
  def main(args: Array[String]): Unit = {
    solve
  }

  def solve(): Unit = {
    val sc = new java.util.Scanner(System.in)
    val n = sc.nextInt
    sc.nextLine
    val s = sc.nextLine.toCharArray

    var count = 0
    var currentChar = '@'
    for (i <- 0 until n) {
      if (s(i) != currentChar) {
        currentChar = s(i)
        count += 1
      }
    }
    println(count)
  }
}
