object Main extends App {

  val n = scala.io.StdIn.readInt()
  val s = scala.io.StdIn.readLine()


  def solve() =  {
    val defaultChar: Char = ' '
    s.foldLeft((0, defaultChar)) { case ((cnt, prevChar), char) =>
      if(char != prevChar) (cnt + 1, char)
      else (cnt, char)
    }._1
  }

  println(solve)

}