var s = require('fs').readFileSync('/dev/stdin', 'utf8').split('\n')[1];

var result = [s[0]];
for (var i = 1; i < s.length; i++)
    if (s[i - 1] !== s[i]) result.push(s[i]);

console.log(result.length);