N=int(eval(input()))

S=eval(input())

S=list(S)

for i in range(len(S)):

    count=0

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

        if S[j]==S[j+1]:

            count+=1

        else:

            break

    #print(count)

    if count>0:

        del S[i+1:i+count+1]

    #print(S)

    if i==len(S)-1:

        break

#print(S)

print((len(S)))
N=int(eval(input()))

S=eval(input())

count=0

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

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

    count+=1

print((len(S)-count))
N = int(eval(input()))
S = eval(input())
S = list(S)
for i in range(len(S)):
    count = 0
    for j in range(i, len(S) - 1):
        if S[j] == S[j + 1]:
            count += 1
        else:
            break
    # print(count)
    if count > 0:
        del S[i + 1 : i + count + 1]
    # print(S)
    if i == len(S) - 1:
        break
# print(S)
print((len(S)))

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

-S = list(S) -for i in range(len(S)): -    count = 0 -    for j in range(i, len(S) - 1): -        if S[j] == S[j + 1]: -            count += 1 -        else: -            break -    # print(count) -    if count > 0: -        del S[i + 1 : i + count + 1] -    # print(S) -    if i == len(S) - 1: -        break -# print(S) -print((len(S))) +count = 0 +for i in range(len(S) - 1): +    if S[i] == S[i + 1]: +        count += 1 +print((len(S) - count))