var fs = require('fs');
fs.readFileSync('/dev/stdin', 'utf8');
var s = fs.readFileSync('/dev/stdin', 'utf8').trim();
console.log(
    new Array(n - 1)
    .fill(null)
    .map((_, i) => i)
    .filter(i => s[i] !== s[i + 1]).length + 1
);