fun main(args: Array<String>) {
    val n = readLine()!!.toInt()
    val s = readLine()!!.toCharArray()
    var result = 1
    var pre = s[0]
    for (i in 1 until s.size) {
        if (s[i] != pre) {
            result += 1
            pre = s[i]
        }
    }
    println(result)
}