fun main(args: Array<String>) {
    val N = readLine()!!.toInt()
    val S = readLine()!!

    println(S.fold(StringBuilder()) { s: StringBuilder, c: Char -> if (s.isNotEmpty() && s.last() == c) s else s.append(c) }.length)
}