N = int(eval(input()))

S = list(eval(input()))

count = 1

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

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

        count += 1

print(count)

    
import itertools

N = eval(input())

S = eval(input())

G = itertools.groupby(S)

print((len(list(G))))

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

import itertools

N = eval(input())
S = eval(input())
G = itertools.groupby(S)
print((len(list(G))))

-N = int(eval(input())) -S = list(eval(input())) -count = 1 -for i in range(len(S) - 1): -    if S[i] != S[i + 1]: -        count += 1 -print(count) +import itertools + +N = eval(input()) +S = eval(input()) +G = itertools.groupby(S) +print((len(list(G))))