n = int(input())
#a, b = map(int, input().split())
#l = list(map(int, input().split()))
s = input()

ans = 1
last = s[0]
for i in range(1,n):
    if last != s[i]:
        last = s[i]
        ans = ans + 1

print(ans)

 n = int(input()) n int(input()) int input() input s = input() s input() input ans = 1 ans 1 last = s[0] last s[0] s 0 for i in range(1,n):
    if last != s[i]:
        last = s[i]
        ans = ans + 1 i range(1,n) range 1 n if last != s[i]:
        last = s[i]
        ans = ans + 1 last != s[i] last s[i] s i last = s[i] last s[i] s i ans = ans + 1 ans ans + 1 ans 1 print(ans) print ans ans = 1 1 ans last = s[0] s[0] last s = input() input() s n = int(input()) int(input()) n ans = ans + 1 ans + 1 ans last = s[i] s[i] last
n = int(input())
#a, b = map(int, input().split())
#l = list(map(int, input().split()))
s = input()

ans = 1
last = s[0]
for i in range(1,n):
    if last != s[i]:
        last = s[i]
        ans = ans + 1

print(ans)


