import sys
readline = sys.stdin.readline

N = int(readline())
S = readline().rstrip()

ans = 1
for i in range(1,len(S)):
  if S[i] != S[i - 1]:
    ans += 1
print(ans) import sys sys readline = sys.stdin.readline readline sys.stdin.readline sys.stdin sys stdin readline N = int(readline()) N int(readline()) int readline() readline S = readline().rstrip() S readline().rstrip() ().rstrip () readline rstrip ans = 1 ans 1 for i in range(1,len(S)):
  if S[i] != S[i - 1]:
    ans += 1 i range(1,len(S)) range 1 len(S) len S if S[i] != S[i - 1]:
    ans += 1 S[i] != S[i - 1] S[i] S i S[i - 1] S i - 1 i 1 ans += 1 ans 1 print(ans) print ans N = int(readline()) int(readline()) N ans += 1 1 ans S = readline().rstrip() readline().rstrip() S ans = 1 1 ans readline = sys.stdin.readline sys.stdin.readline readline
import sys
readline = sys.stdin.readline

N = int(readline())
S = readline().rstrip()

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