import java.util.*

fun main(args : Array<String>) {
    val scanner = Scanner(System.`in`)
    val n = scanner.nextInt()
    val s = scanner.next()
    var spre = s.get(0)
    var sum = 1
    for (i in 1..n-1) {
        val si = s.get(i)
        if (spre != si) {
            spre = si
            sum += 1
        }
    }
    println(sum)
}