object Main extends App {
    def runLength[X](xs: List[X]): List[(Int, X)] = xs match {
      case Nil => Nil
      case y :: ys => runLength(ys) match {
        case (c, `y`) :: rest => (c + 1, y) :: rest
        case             rest => (    1, y) :: rest
      }
    }

    val garbage = scala.io.StdIn.readLine
    val colors = scala.io.StdIn.readLine.split("").toList.tail
    val answer = runLength(colors).map(_._2).length

    println(answer)
}