import java.util.Scanner

object Main extends App{
  val sc = new Scanner(System.in)

  val n = sc.nextInt

  val s = sc.next

  val sVec = s.toVector
  val res =  sVec.tail.foldLeft((1, sVec.head)) { case ((cnt, preCh), ch) =>
    (cnt + (if(ch != preCh) 1 else 0), ch )
  }._1

  println(res)
}
