fun main(arr:Array<String>) {
    val slimeCount = readLine()!!.toInt()
    val slimes = readLine()!!
    val melted = mutableListOf(slimes[0])
    for(i in (1 until  slimeCount)) {
        if(slimes[i] == melted.last()) {
            continue
        }
        melted.add(slimes[i])
    }
    println(melted.size)
}