N = int(input())
S = input()
S_ = []

for i in range(len(S)-1):
    if i == len(S)-2 and S[i] != S[i+1]:
        S_.append(S[i])
        S_.append(S[i+1])
    elif i == len(S)-2 and S[i] == S[i+1]:
        S_.append(S[i])
    elif S[i] != S[i+1]:
        S_.append(S[i])
if len(S_) == 0:
    print('1')
else:
    print(len(S_))
     N = int(input()) N int(input()) int input() input S = input() S input() input S_ = [] S_ [] for i in range(len(S)-1):
    if i == len(S)-2 and S[i] != S[i+1]:
        S_.append(S[i])
        S_.append(S[i+1])
    elif i == len(S)-2 and S[i] == S[i+1]:
        S_.append(S[i])
    elif S[i] != S[i+1]:
        S_.append(S[i]) i range(len(S)-1) range len(S)-1 len(S) len S 1 if i == len(S)-2 and S[i] != S[i+1]:
        S_.append(S[i])
        S_.append(S[i+1])
    elif i == len(S)-2 and S[i] == S[i+1]:
        S_.append(S[i])
    elif S[i] != S[i+1]:
        S_.append(S[i]) i == len(S)-2 and S[i] != S[i+1] i == len(S)-2 i len(S)-2 len(S) len S 2 S[i] != S[i+1] S[i] S i S[i+1] S i+1 i 1 S_.append(S[i]) S_.append S_ append S[i] S i S_.append(S[i+1]) S_.append S_ append S[i+1] S i+1 i 1 elif i == len(S)-2 and S[i] == S[i+1]:
        S_.append(S[i])
     i == len(S)-2 and S[i] == S[i+1] i == len(S)-2 i len(S)-2 len(S) len S 2 S[i] == S[i+1] S[i] S i S[i+1] S i+1 i 1 S_.append(S[i]) S_.append S_ append S[i] S i elif S[i] != S[i+1]:
        S_.append(S[i]) S[i] != S[i+1] S[i] S i S[i+1] S i+1 i 1 S_.append(S[i]) S_.append S_ append S[i] S i if len(S_) == 0:
    print('1')
else:
    print(len(S_))
     len(S_) == 0 len(S_) len S_ 0 print('1') print '1' print(len(S_)) print len(S_) len S_ S_ = [] [] S_ S = input() input() S N = int(input()) int(input()) N
N = int(input())
S = input()
S_ = []

for i in range(len(S)-1):
    if i == len(S)-2 and S[i] != S[i+1]:
        S_.append(S[i])
        S_.append(S[i+1])
    elif i == len(S)-2 and S[i] == S[i+1]:
        S_.append(S[i])
    elif S[i] != S[i+1]:
        S_.append(S[i])
if len(S_) == 0:
    print('1')
else:
    print(len(S_))
    
