import java.util.Scanner
import java.io.PrintWriter

object Main {
  def main(args: Array[String]): Unit = {
    val sc = new Scanner(System.in)
    val pw = new PrintWriter(System.out)

    val n = sc.nextInt()
    val s = sc.next()
    var ans = 0
    var before: Char = ' '
    for (i <- 0 until n) {
      if (s(i) != before) {
        ans += 1;
        before = s(i);
      }
    }
    pw.println(ans)

    pw.flush()
  }
}