N = int(eval(input()))

S = eval(input())



import itertools



l = [k for k, v in itertools.groupby(S)]

print((len(l)))

N = int(eval(input()))

S = eval(input())

cnt = 1

for i in range(len(S)-1):

    if S[i] != S[i+1]:

        cnt += 1

print(cnt)

N = int(eval(input()))
S = eval(input())
import itertools

l = [k for k, v in itertools.groupby(S)]
print((len(l)))

N = int(eval(input()))
S = eval(input())
cnt = 1
for i in range(len(S) - 1):
    if S[i] != S[i + 1]:
        cnt += 1
print(cnt)

-import itertools - -l = [k for k, v in itertools.groupby(S)] -print((len(l))) +cnt = 1 +for i in range(len(S) - 1): +    if S[i] != S[i + 1]: +        cnt += 1 +print(cnt)