N = int(eval(input()))

S=list(eval(input()))

x = S[0]

ans = 1

for i in range(1, N):

    if x != S[i]:

        ans += 1 

    x = S[i]

print(ans)
import itertools 



N = int(eval(input()))

S = list(eval(input()))



s = itertools.groupby(S)

ans = []

for key, group in s:

    ans.append(key)

print((len(ans)))
N = int(eval(input()))
S = list(eval(input()))
x = S[0]
ans = 1
for i in range(1, N):
    if x != S[i]:
        ans += 1
    x = S[i]
print(ans)

import itertools

N = int(eval(input()))
S = list(eval(input()))
s = itertools.groupby(S)
ans = []
for key, group in s:
    ans.append(key)
print((len(ans)))

+import itertools + -x = S[0] -ans = 1 -for i in range(1, N): -    if x != S[i]: -        ans += 1 -    x = S[i] -print(ans) +s = itertools.groupby(S) +ans = [] +for key, group in s: +    ans.append(key) +print((len(ans)))