n = int(eval(input()))

s = eval(input())

before = ''

new = ''

for c in s:

    if before != c:

        new += c

        before = c

print((len(new)))
import re



N = int(eval(input()))

S = eval(input())



rex = r'(.)\1{0,}'

pattern = re.compile(rex)

ans = pattern.findall(S)



print((len(ans)))
n = int(eval(input()))
s = eval(input())
before = ""
new = ""
for c in s:
    if before != c:
        new += c
        before = c
print((len(new)))

import re

N = int(eval(input()))
S = eval(input())
rex = r"(.)\1{0,}"
pattern = re.compile(rex)
ans = pattern.findall(S)
print((len(ans)))

-n = int(eval(input())) -s = eval(input()) -before = "" -new = "" -for c in s: -    if before != c: -        new += c -        before = c -print((len(new))) +import re + +N = int(eval(input())) +S = eval(input()) +rex = r"(.)\1{0,}" +pattern = re.compile(rex) +ans = pattern.findall(S) +print((len(ans)))