fun main (args:Array<String>){
    val numOfSlime = readLine()!!.toInt()
    val strS = readLine()!!
    var ans = numOfSlime
    for(i in 0..numOfSlime-2){
        if(strS[i] == strS[i+1]){
            ans--
        }
    }
    print(ans)
}