import std.stdio;
import std.string;
import std.conv;

void main() {
	int n;
	scanf("%d\n", &n);
	auto s = readln.chomp;
	auto cache = '\n';
	size_t cnt;
	foreach(c; s) {
		if (c != cache) {
			cache = c;
			++cnt;
		}
	}
	cnt.write;
}
