N = int(eval(input()))

l = list(eval(input()))

r = 0

for i, s in enumerate(l):

    if i + 1 == N:

        r += 1

        print(r)

        break

    if s != l[i + 1]:

        r += 1
N = int(eval(input()))

l = list(eval(input()))

r = 0

S = ''

for s in l:

    if S != s:

        r += 1

    S = s

print(r)
N = int(eval(input()))
l = list(eval(input()))
r = 0
for i, s in enumerate(l):
    if i + 1 == N:
        r += 1
        print(r)
        break
    if s != l[i + 1]:
        r += 1

N = int(eval(input()))
l = list(eval(input()))
r = 0
S = ""
for s in l:
    if S != s:
        r += 1
    S = s
print(r)

-for i, s in enumerate(l): -    if i + 1 == N: +S = "" +for s in l: +    if S != s: -        print(r) -        break -    if s != l[i + 1]: -        r += 1 +    S = s +print(r)