N = int(input())
S = input()

cnt = 0
sum = len(S)


for i in range(N-1):

  
  if S[i] == S[i+1]:
  	cnt += 1
  else:
  	continue

ans = sum - cnt

print(ans) N = int(input()) N int(input()) int input() input S = input() S input() input cnt = 0 cnt 0 sum = len(S) sum len(S) len S for i in range(N-1):

  
  if S[i] == S[i+1]:
  	cnt += 1
  else:
  	continue i range(N-1) range N-1 N 1 if S[i] == S[i+1]:
  	cnt += 1
  else:
  	continue S[i] == S[i+1] S[i] S i S[i+1] S i+1 i 1 cnt += 1 cnt 1 continue ans = sum - cnt ans sum - cnt sum cnt print(ans) print ans sum = len(S) len(S) sum S = input() input() S ans = sum - cnt sum - cnt ans N = int(input()) int(input()) N cnt = 0 0 cnt cnt += 1 1 cnt
N = int(input())
S = input()

cnt = 0
sum = len(S)


for i in range(N-1):

  
  if S[i] == S[i+1]:
  	cnt += 1
  else:
  	continue

ans = sum - cnt

print(ans)