"use strict";
    
const main = arg => {
    arg = arg.trim().split("\n");
    const N = parseInt(arg[0]);
    const S = arg[1].split("");
    
    let answer = 1;
    let previous = S[0];
    
    let set = new Set(S);
    
    if([...set].length === 1) {
        console.log(1);
        return;
    }
    
    if([...set].length === N) {
        console.log(N);
        return;
    }
    
    for(let i=1; i<N; i++) {
        // console.log(S[i]);
        // console.log(previous);
        
        if(S[i] !== previous) {
            answer++;
        }
        
        previous = S[i];
    }
    
    console.log(answer);
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));