n = int(eval(input()))

d = list(eval(input()))



ans = list(d.pop(0))



while d:

  target = d.pop(0)

  if ans[-1] != target:

    ans.append(target)



print((len(ans)))
from  itertools import groupby

_ = eval(input())

s = list(groupby(eval(input())))



print((len(s)))
n = int(eval(input()))
d = list(eval(input()))
ans = list(d.pop(0))
while d:
    target = d.pop(0)
    if ans[-1] != target:
        ans.append(target)
print((len(ans)))

from itertools import groupby

_ = eval(input())
s = list(groupby(eval(input())))
print((len(s)))

-n = int(eval(input())) -d = list(eval(input())) -ans = list(d.pop(0)) -while d: -    target = d.pop(0) -    if ans[-1] != target: -        ans.append(target) -print((len(ans))) +from itertools import groupby + +_ = eval(input()) +s = list(groupby(eval(input()))) +print((len(s)))