object Main extends App {

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


  def solve() =  {
    var cnt = 0
    var prevChar: Char = ' '
    s.foreach { char =>
      if(char != prevChar) cnt += 1
      prevChar = char
    }
    cnt
  }

  println(solve)

}
