fun main(args: Array<String>){
    val N = nextInt()
    val S = next()
    var c = '?'
    var ans = 0
    S.forEach {
        if (it != c) {
            ans++
            c = it
        }
    }
    println(ans)
}
fun next() = readLine()!!
fun nextInt(delta: Int = 0) = Integer.parseInt(next()) + delta