object Main extends App {
  val input1 = readLine
  val input2 = readLine
  val N = input1
  val r = input2.foldLeft("")((l, r) => if (l.lastOption.getOrElse("") == r) l else l + r)
  val result = r.length
  println(result)
}