fun main(args: Array<String>) {
    val n = readLine()?.toInt() ?: return
    val s = readLine() ?: return
    var count = 0
    0.until(n - 1).forEach { i ->
        if (s[i] != s[i + 1]) {
            count++
        }
    }
    println((count + 1).toString())
}