N = int(eval(input()))

S = list(eval(input()))



ans = 1

for i in range(N):

    if i == N - 1:

        print(ans)

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

        i += 1

        continue

    else:

        ans += 1

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

S = list(eval(input()))



ans = 1

for i in range(N):

    if i == N - 1:

        print(ans)

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

        continue

    else:

        ans += 1
N = int(eval(input()))
S = list(eval(input()))
ans = 1
for i in range(N):
    if i == N - 1:
        print(ans)
    elif S[i] == S[i + 1]:
        i += 1
        continue
    else:
        ans += 1
        i += 1

N = int(eval(input()))
S = list(eval(input()))
ans = 1
for i in range(N):
    if i == N - 1:
        print(ans)
    elif S[i] == S[i + 1]:
        continue
    else:
        ans += 1

-        i += 1 -        i += 1