n = int(eval(input()))

s = str(eval(input()))



a = []

b = 0

for i in range(1,n):

    if s[i] == s[i-1]:

        b += 1

    else:

        a.append(b)

        b = 0

    if i == n-1:

        a.append(b)

        b = 0



c = 0

for i in range(len(a)):

    c += a[i]



print((n-c))

# -*- coding: utf-8 -*-

N = int(eval(input()))

S = str(eval(input()))



X = N

for i in range(N - 1):

    if S[i] == S[i + 1]:

        X -= 1

print(X)
n = int(eval(input()))
s = str(eval(input()))
a = []
b = 0
for i in range(1, n):
    if s[i] == s[i - 1]:
        b += 1
    else:
        a.append(b)
        b = 0
    if i == n - 1:
        a.append(b)
        b = 0
c = 0
for i in range(len(a)):
    c += a[i]
print((n - c))

# -*- coding: utf-8 -*-
N = int(eval(input()))
S = str(eval(input()))
X = N
for i in range(N - 1):
    if S[i] == S[i + 1]:
        X -= 1
print(X)

-n = int(eval(input())) -s = str(eval(input())) -a = [] -b = 0 -for i in range(1, n): -    if s[i] == s[i - 1]: -        b += 1 -    else: -        a.append(b) -        b = 0 -    if i == n - 1: -        a.append(b) -        b = 0 -c = 0 -for i in range(len(a)): -    c += a[i] -print((n - c)) +# -*- coding: utf-8 -*- +N = int(eval(input())) +S = str(eval(input())) +X = N +for i in range(N - 1): +    if S[i] == S[i + 1]: +        X -= 1 +print(X)