function main(input) {
    const args = input.split('\n');
    const N = parseInt(args[0], 10),
          S = args[1];
    var s = S.split('');
    for (var i = 0; i < s.length; i++) {
        if (s[i] == s[i + 1]) s[i] = null;
    }
    console.log(s.join('').length);
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));