N = int(input())
S = input()
S = list(S)
color = [0]
j = 0
for i in range(1,N) :
    if S[i-1] == S[i] :
        color.append(j)
    else :
        j += 1
        color.append(j)

print(len(set(color))) N = int(input()) N int(input()) int input() input S = input() S input() input S = list(S) S list(S) list S color = [0] color [0] 0 j = 0 j 0 for i in range(1,N) :
    if S[i-1] == S[i] :
        color.append(j)
    else :
        j += 1
        color.append(j) i range(1,N) range 1 N if S[i-1] == S[i] :
        color.append(j)
    else :
        j += 1
        color.append(j) S[i-1] == S[i] S[i-1] S i-1 i 1 S[i] S i color.append(j) color.append color append j j += 1 j 1 color.append(j) color.append color append j print(len(set(color))) print len(set(color)) len set(color) set color S = input() input() S color = [0] [0] color j += 1 1 j N = int(input()) int(input()) N S = list(S) list(S) S j = 0 0 j
N = int(input())
S = input()
S = list(S)
color = [0]
j = 0
for i in range(1,N) :
    if S[i-1] == S[i] :
        color.append(j)
    else :
        j += 1
        color.append(j)

print(len(set(color)))