import sys

inint = lambda: int(sys.stdin.readline())
inintm = lambda: map(int, sys.stdin.readline().split())
inintl = lambda: list(inintm())
instr = lambda: sys.stdin.readline()
instrm = lambda: map(str, sys.stdin.readline().split())
instrl = lambda: list(instrm())

n = inint()
s = instr()

prev = s[0]
ans = 1

for i in range(1,n):
    if s[i] == prev:
        continue
    else:
        prev = s[i]
        ans += 1

print(ans) import sys sys inint = lambda: int(sys.stdin.readline()) inint lambda: int(sys.stdin.readline()) int(sys.stdin.readline()) int sys.stdin.readline() sys.stdin.readline sys.stdin sys stdin readline inintm = lambda: map(int, sys.stdin.readline().split()) inintm lambda: map(int, sys.stdin.readline().split()) map(int, sys.stdin.readline().split()) map int sys.stdin.readline().split() sys.stdin.readline().split sys.stdin.readline() sys.stdin.readline sys.stdin sys stdin readline split inintl = lambda: list(inintm()) inintl lambda: list(inintm()) list(inintm()) list inintm() inintm instr = lambda: sys.stdin.readline() instr lambda: sys.stdin.readline() sys.stdin.readline() sys.stdin.readline sys.stdin sys stdin readline instrm = lambda: map(str, sys.stdin.readline().split()) instrm lambda: map(str, sys.stdin.readline().split()) map(str, sys.stdin.readline().split()) map str sys.stdin.readline().split() sys.stdin.readline().split sys.stdin.readline() sys.stdin.readline sys.stdin sys stdin readline split instrl = lambda: list(instrm()) instrl lambda: list(instrm()) list(instrm()) list instrm() instrm n = inint() n inint() inint s = instr() s instr() instr prev = s[0] prev s[0] s 0 ans = 1 ans 1 for i in range(1,n):
    if s[i] == prev:
        continue
    else:
        prev = s[i]
        ans += 1 i range(1,n) range 1 n if s[i] == prev:
        continue
    else:
        prev = s[i]
        ans += 1 s[i] == prev s[i] s i prev continue prev = s[i] prev s[i] s i ans += 1 ans 1 print(ans) print ans instr = lambda: sys.stdin.readline() lambda: sys.stdin.readline() instr prev = s[i] s[i] prev inintm = lambda: map(int, sys.stdin.readline().split()) lambda: map(int, sys.stdin.readline().split()) inintm inintl = lambda: list(inintm()) lambda: list(inintm()) inintl instrl = lambda: list(instrm()) lambda: list(instrm()) instrl inint = lambda: int(sys.stdin.readline()) lambda: int(sys.stdin.readline()) inint instrm = lambda: map(str, sys.stdin.readline().split()) lambda: map(str, sys.stdin.readline().split()) instrm ans = 1 1 ans n = inint() inint() n prev = s[0] s[0] prev s = instr() instr() s ans += 1 1 ans
import sys

inint = lambda: int(sys.stdin.readline())
inintm = lambda: map(int, sys.stdin.readline().split())
inintl = lambda: list(inintm())
instr = lambda: sys.stdin.readline()
instrm = lambda: map(str, sys.stdin.readline().split())
instrl = lambda: list(instrm())

n = inint()
s = instr()

prev = s[0]
ans = 1

for i in range(1,n):
    if s[i] == prev:
        continue
    else:
        prev = s[i]
        ans += 1

print(ans)
