n = int(eval(input()))

s = eval(input())

ans = s[:1]

for i in range(1, n):

    if ans[-1:] != s[i]:

        ans += s[i]

print((len(ans)))
import itertools

n = int(eval(input()))

s = list(eval(input()))

ans = [k for k, v in itertools.groupby(s)]

print((len(ans)))
n = int(eval(input()))
s = eval(input())
ans = s[:1]
for i in range(1, n):
    if ans[-1:] != s[i]:
        ans += s[i]
print((len(ans)))

import itertools

n = int(eval(input()))
s = list(eval(input()))
ans = [k for k, v in itertools.groupby(s)]
print((len(ans)))

+import itertools + -s = eval(input()) -ans = s[:1] -for i in range(1, n): -    if ans[-1:] != s[i]: -        ans += s[i] +s = list(eval(input())) +ans = [k for k, v in itertools.groupby(s)]