// var n = 1;
// var s = "aaaaa";

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

var result = 1;
var length = 1;
var target = s[0];

for (var i = 1; i < n; i += length) {
    console.log(i);

    length = 1;
    for (var j = i; j < n; j++) {
        if (target === s[j]) length++;
        else {
            target = s[j];
            break;
        }
    }
    result++;
}

console.log(result);