'use strict';

const testcase = null;

function main(input) {
    const n = parseInt(input.shift());
    const s = input.shift();
    var p = null;
    var c = 0;
    for (var i = 0; i < n; i++) {
        if (p !== s[i]) {
            p = s[i];
            c += 1;
        }
    }
    console.log(c);
}

if (process.argv[1] == __filename) {
    const input = testcase
        || require('fs')
            .readFileSync('/dev/stdin', 'utf-8');
    main(input.split(/\s/));
}
