function Main(input) {
    input = input.split("\n")
    input = input.map(e=>e.split(" "))
    //input = input.map(e=>e.map(f=>parseInt(f,10)))    
    
    var resultText = input[1][0].split("").reduce((pre,cur,ind,src)=>{        
        return pre + (cur == src[ind-1]?"":cur)
    },"")
      
    console.log(resultText.length);
}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));