
fun main(args: Array<String>) {
    readLine()
    val inp = readLine()!!
    var hist = ""
    var ans = 0
    inp.forEach {
        if(it.toString() != hist) ans++
        hist = it.toString()
    }
    println(ans)
}
