n = int(input())
s = input()
prev_char = ""
result = 0

for i in s:
  if (prev_char != i):
    result += 1
  prev_char = i

print(result) n = int(input()) n int(input()) int input() input s = input() s input() input prev_char = "" prev_char "" result = 0 result 0 for i in s:
  if (prev_char != i):
    result += 1
  prev_char = i i s if (prev_char != i):
    result += 1
   prev_char != i prev_char i result += 1 result 1 prev_char = i prev_char i print(result) print result n = int(input()) int(input()) n prev_char = i i prev_char result = 0 0 result prev_char = "" "" prev_char result += 1 1 result s = input() input() s
n = int(input())
s = input()
prev_char = ""
result = 0

for i in s:
  if (prev_char != i):
    result += 1
  prev_char = i

print(result)