object Main extends App {

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


  def solve() =  {
    s.foldLeft("") { (acc, char) =>
      if(acc.isEmpty) char.toString
      else if(acc.last == char) acc
      else acc + char.toString
    }.length
  }

  println(solve)

}
