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