def remove_slimes(ls):
	l = [ls[0]]
	for i in range(1, len(ls)):
		if ls[i-1] != ls[i]:
			l.append(ls[i])
	return len(l)

n = int(input())
s = input()
cnt = 1
if len(s) != 1:
	cnt = remove_slimes(list(s))
print(cnt) def remove_slimes(ls):
	l = [ls[0]]
	for i in range(1, len(ls)):
		if ls[i-1] != ls[i]:
			l.append(ls[i])
	return len(l) remove_slimes l = [ls[0]] l [ls[0]] ls[0] ls 0 for i in range(1, len(ls)):
		if ls[i-1] != ls[i]:
			l.append(ls[i])
	 i range(1, len(ls)) range 1 len(ls) len ls if ls[i-1] != ls[i]:
			l.append(ls[i])
	 ls[i-1] != ls[i] ls[i-1] ls i-1 i 1 ls[i] ls i l.append(ls[i]) l.append l append ls[i] ls i return len(l) len(l) len l ls ls n = int(input()) n int(input()) int input() input s = input() s input() input cnt = 1 cnt 1 if len(s) != 1:
	cnt = remove_slimes(list(s)) len(s) != 1 len(s) len s 1 cnt = remove_slimes(list(s)) cnt remove_slimes(list(s)) remove_slimes list(s) list s print(cnt) print cnt cnt = 1 1 cnt cnt = remove_slimes(list(s)) remove_slimes(list(s)) cnt n = int(input()) int(input()) n s = input() input() s def remove_slimes(ls):
	l = [ls[0]]
	for i in range(1, len(ls)):
		if ls[i-1] != ls[i]:
			l.append(ls[i])
	return len(l) def remove_slimes(ls):
	l = [ls[0]]
	for i in range(1, len(ls)):
		if ls[i-1] != ls[i]:
			l.append(ls[i])
	return len(l) remove_slimes
def remove_slimes(ls):
	l = [ls[0]]
	for i in range(1, len(ls)):
		if ls[i-1] != ls[i]:
			l.append(ls[i])
	return len(l)

n = int(input())
s = input()
cnt = 1
if len(s) != 1:
	cnt = remove_slimes(list(s))
print(cnt)