var fs = require('fs');
var n = fs.readFileSync('/dev/stdin', 'utf8').trim();
var s = fs.readFileSync('/dev/stdin', 'utf8').trim();

var result = [s[0]];
for (var i = 1; i < n; i++) {
    if (s[i - 1] === s[i]) continue;
    result.push(s[i]);
}
console.log(result.length);