import sys
def input(): return sys.stdin.readline().strip()
def mapint(): return map(int, input().split())
sys.setrecursionlimit(10**9)

N = int(input())
S = ['_']+list(input())

ans = 0
for i in range(1, N+1):
    if S[i-1]!=S[i]:
        ans += 1
print(ans) import sys sys def input(): return sys.stdin.readline().strip() input def mapint(): return map(int, input().split()) mapint sys.setrecursionlimit(10**9) sys.setrecursionlimit sys setrecursionlimit 10**9 10 9 N = int(input()) N int(input()) int input() input S = ['_']+list(input()) S ['_']+list(input()) ['_'] '_' list(input()) list input() input ans = 0 ans 0 for i in range(1, N+1):
    if S[i-1]!=S[i]:
        ans += 1 i range(1, N+1) range 1 N+1 N 1 if S[i-1]!=S[i]:
        ans += 1 S[i-1]!=S[i] S[i-1] S i-1 i 1 S[i] S i ans += 1 ans 1 print(ans) print ans ans += 1 1 ans S = ['_']+list(input()) ['_']+list(input()) S def mapint(): return map(int, input().split()) def mapint(): return map(int, input().split()) mapint def input(): return sys.stdin.readline().strip() def input(): return sys.stdin.readline().strip() input ans = 0 0 ans N = int(input()) int(input()) N
import sys
def input(): return sys.stdin.readline().strip()
def mapint(): return map(int, input().split())
sys.setrecursionlimit(10**9)

N = int(input())
S = ['_']+list(input())

ans = 0
for i in range(1, N+1):
    if S[i-1]!=S[i]:
        ans += 1
print(ans)