object Main {
  def main(args: Array[String]): Unit = {
    val sc = new java.util.Scanner(System.in)
    val n = sc.nextInt
    val s = sc.next
    sc.close

    println(fn(s.toList).length)
  }
  def fn(xs: List[Char]): List[Char] = {
    def go(l: List[Char], o: List[Char]): List[Char] = {
      l match {
        case Nil    => o
        case h :: t => if (h == o.last) go(t, o) else go(t, o :+ h)
      }
    }
    go(xs.tail, List(xs.head))
  }
}