input = require('fs').readFileSync('/dev/stdin', 'utf8')
lines = input.split('\n')
N = lines.shift() * 1
s = lines.shift()
c = 1
a = s[0]
for (i=1; i<s.length; i++) {
    if (a != s[i]) {
        c++
    }
    a = s[i]
}
console.log(c)