length = int(eval(input()))

li = list(eval(input()))

li2 = []

i = -1

for str in li[:]:

    i = 1 + i

    if i + 1 == len(li):

        li2.append(li[i])

        print((len(li2)))

        break

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

        li2.append(li[i])

        continue
length = int(eval(input()))

li = list(eval(input()))

li2 = []

for i, str in enumerate(li):

    if i + 1 == length:

        li2.append(str)

        print((len(li2)))

        break

    if str != li[i + 1]:

        li2.append(str)

        continue
length = int(eval(input()))
li = list(eval(input()))
li2 = []
i = -1
for str in li[:]:
    i = 1 + i
    if i + 1 == len(li):
        li2.append(li[i])
        print((len(li2)))
        break
    if li[i] != li[i + 1]:
        li2.append(li[i])
        continue

length = int(eval(input()))
li = list(eval(input()))
li2 = []
for i, str in enumerate(li):
    if i + 1 == length:
        li2.append(str)
        print((len(li2)))
        break
    if str != li[i + 1]:
        li2.append(str)
        continue

-i = -1 -for str in li[:]: -    i = 1 + i -    if i + 1 == len(li): -        li2.append(li[i]) +for i, str in enumerate(li): +    if i + 1 == length: +        li2.append(str) -    if li[i] != li[i + 1]: -        li2.append(li[i]) +    if str != li[i + 1]: +        li2.append(str)