N = int(input())
S = list(input())
A = [0] * N
same = False
import math
for i in range(1, N):
  if S[i] == S[i-1]:
    same = True
  elif same and S[i] != S[i-1]:
    A[i] = 1
    same = False
  else:
    same = False
    A[i] = 1
    
print(sum(A)+1) N = int(input()) N int(input()) int input() input S = list(input()) S list(input()) list input() input A = [0] * N A [0] * N [0] 0 N same = False same False import math math for i in range(1, N):
  if S[i] == S[i-1]:
    same = True
  elif same and S[i] != S[i-1]:
    A[i] = 1
    same = False
  else:
    same = False
    A[i] = 1
     i range(1, N) range 1 N if S[i] == S[i-1]:
    same = True
  elif same and S[i] != S[i-1]:
    A[i] = 1
    same = False
  else:
    same = False
    A[i] = 1
     S[i] == S[i-1] S[i] S i S[i-1] S i-1 i 1 same = True same True elif same and S[i] != S[i-1]:
    A[i] = 1
    same = False
   same and S[i] != S[i-1] same S[i] != S[i-1] S[i] S i S[i-1] S i-1 i 1 A[i] = 1 A[i] A i 1 same = False same False same = False same False A[i] = 1 A[i] A i 1 print(sum(A)+1) print sum(A)+1 sum(A) sum A 1 S = list(input()) list(input()) S A = [0] * N [0] * N A N = int(input()) int(input()) N same = False False same same = False False same same = True True same same = False False same
N = int(input())
S = list(input())
A = [0] * N
same = False
import math
for i in range(1, N):
  if S[i] == S[i-1]:
    same = True
  elif same and S[i] != S[i-1]:
    A[i] = 1
    same = False
  else:
    same = False
    A[i] = 1
    
print(sum(A)+1)