import sys
input = lambda : sys.stdin.readline().rstrip()
sys.setrecursionlimit(max(1000, 10**9))
write = lambda x: sys.stdout.write(x+"\n")


n = int(input())
s = input()
prv = "*"
ans = 0
for i,c in enumerate(s):
    if c!=prv:
        ans += 1
    prv = c
print(ans) import sys sys input = lambda : sys.stdin.readline().rstrip() input lambda : sys.stdin.readline().rstrip() sys.stdin.readline().rstrip() sys.stdin.readline().rstrip sys.stdin.readline() sys.stdin.readline sys.stdin sys stdin readline rstrip sys.setrecursionlimit(max(1000, 10**9)) sys.setrecursionlimit sys setrecursionlimit max(1000, 10**9) max 1000 10**9 10 9 write = lambda x: sys.stdout.write(x+"\n") write lambda x: sys.stdout.write(x+"\n") sys.stdout.write(x+"\n") sys.stdout.write sys.stdout sys stdout write x+"\n" x "\n" x n = int(input()) n int(input()) int input() input s = input() s input() input prv = "*" prv "*" ans = 0 ans 0 for i,c in enumerate(s):
    if c!=prv:
        ans += 1
    prv = c i c enumerate(s) enumerate s if c!=prv:
        ans += 1
     c!=prv c prv ans += 1 ans 1 prv = c prv c print(ans) print ans prv = c c prv ans += 1 1 ans input = lambda : sys.stdin.readline().rstrip() lambda : sys.stdin.readline().rstrip() input n = int(input()) int(input()) n ans = 0 0 ans write = lambda x: sys.stdout.write(x+"\n") lambda x: sys.stdout.write(x+"\n") write s = input() input() s prv = "*" "*" prv
import sys
input = lambda : sys.stdin.readline().rstrip()
sys.setrecursionlimit(max(1000, 10**9))
write = lambda x: sys.stdout.write(x+"\n")


n = int(input())
s = input()
prv = "*"
ans = 0
for i,c in enumerate(s):
    if c!=prv:
        ans += 1
    prv = c
print(ans)