import re

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

result = ''

for i in range(len(S)):
    if i == len(S) - 1:
        result += S[i]
    elif S[i] != S[i+1]:
        result += S[i]

print(len(result)) import re re N = int(input()) N int(input()) int input() input S = input() S input() input result = '' result '' for i in range(len(S)):
    if i == len(S) - 1:
        result += S[i]
    elif S[i] != S[i+1]:
        result += S[i] i range(len(S)) range len(S) len S if i == len(S) - 1:
        result += S[i]
    elif S[i] != S[i+1]:
        result += S[i] i == len(S) - 1 i len(S) - 1 len(S) len S 1 result += S[i] result S[i] S i elif S[i] != S[i+1]:
        result += S[i] S[i] != S[i+1] S[i] S i S[i+1] S i+1 i 1 result += S[i] result S[i] S i print(len(result)) print len(result) len result result += S[i] S[i] result N = int(input()) int(input()) N S = input() input() S result = '' '' result result += S[i] S[i] result
import re

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

result = ''

for i in range(len(S)):
    if i == len(S) - 1:
        result += S[i]
    elif S[i] != S[i+1]:
        result += S[i]

print(len(result))
