#!/usr/bin/env python3

N = int(input())
S = input()

cnt = 1

check = S[0]

for i, s in enumerate(S[1:]):
    if s == check:
        if i == N - 1:
            cnt += 1
        continue
    else:
        cnt += 1
        check = s

print(cnt) N = int(input()) N int(input()) int input() input S = input() S input() input cnt = 1 cnt 1 check = S[0] check S[0] S 0 for i, s in enumerate(S[1:]):
    if s == check:
        if i == N - 1:
            cnt += 1
        continue
    else:
        cnt += 1
        check = s i s enumerate(S[1:]) enumerate S[1:] S 1: 1 if s == check:
        if i == N - 1:
            cnt += 1
        continue
    else:
        cnt += 1
        check = s s == check s check if i == N - 1:
            cnt += 1
         i == N - 1 i N - 1 N 1 cnt += 1 cnt 1 continue cnt += 1 cnt 1 check = s check s print(cnt) print cnt N = int(input()) int(input()) N cnt += 1 1 cnt check = S[0] S[0] check check = s s check cnt += 1 1 cnt cnt = 1 1 cnt S = input() input() S
#!/usr/bin/env python3

N = int(input())
S = input()

cnt = 1

check = S[0]

for i, s in enumerate(S[1:]):
    if s == check:
        if i == N - 1:
            cnt += 1
        continue
    else:
        cnt += 1
        check = s

print(cnt)
