import scala.collection.mutable.ListBuffer
import scala.io.StdIn

object Main extends App {
  StdIn.readLine()
  val l = StdIn.readLine()
  var size = 0
  for (i <- l.indices){
    if(i == 0 || l(i) != l(i-1)) size += 1
  }
  println(size)
}
