function main(input) {
    var s = input.split('\n')[1];

    var result = [s[0]];
    for (var i = 1; i < s.length; i++)
        if (s[i - 1] !== s[i]) result.push(s[i]);

    console.log(result.length);
}

main(require('fs').readFileSync('/dev/stdin', 'utf8'));