n = int(input())
s = input()

count = 1
i = 0

while i < n-1:
    if s[i] == s[i+1]:
        i += 1

    else:
        count += 1
        i += 1

print(count) n = int(input()) n int(input()) int input() input s = input() s input() input count = 1 count 1 i = 0 i 0 while i < n-1:
    if s[i] == s[i+1]:
        i += 1

    else:
        count += 1
        i += 1 i < n-1 i n-1 n 1 if s[i] == s[i+1]:
        i += 1

    else:
        count += 1
        i += 1 s[i] == s[i+1] s[i] s i s[i+1] s i+1 i 1 i += 1 i 1 count += 1 count 1 i += 1 i 1 print(count) print count i += 1 1 i s = input() input() s count = 1 1 count i += 1 1 i count += 1 1 count i = 0 0 i n = int(input()) int(input()) n
n = int(input())
s = input()

count = 1
i = 0

while i < n-1:
    if s[i] == s[i+1]:
        i += 1

    else:
        count += 1
        i += 1

print(count)