import java.util.Scanner

val sc = Scanner(System.`in`)

fun main(args : Array<String>) {
    var n = sc.nextInt()
    var s = sc.next()!!

    var prev = '-'
    val slimes = mutableListOf<Char>()
    s.forEach {
        if (it != prev) {
            slimes.add(it)
        }
        prev = it
    }

    println(slimes.count())
}