function Main(input) {
    var N = parseInt(input[0], 10);
    var S = input[1].split('');

    var result = 1;

    for (var i = 1; i < N; i++) {
        if (S[i] !== S[i - 1]) {
            result++;
        }
    }

    console.log(result);
}

Main(require("fs").readFileSync("/dev/stdin", "utf8").trim().split(/\n|\s/));