N = int(input())
S = str(input())
#print(N,S)

stack = []
while len(S) > 0:
    if len(stack) == 0:
        stack.append(S[0])
        S = S[1:]
    elif S[0] == stack[-1]:
        S = S[1:]
    
    elif S[0] != stack[-1]:
        stack.append(S[0])
        S = S[1:]
    #print(S,stack)
print(len(stack))
         N = int(input()) N int(input()) int input() input S = str(input()) S str(input()) str input() input stack = [] stack [] while len(S) > 0:
    if len(stack) == 0:
        stack.append(S[0])
        S = S[1:]
    elif S[0] == stack[-1]:
        S = S[1:]
    
    elif S[0] != stack[-1]:
        stack.append(S[0])
        S = S[1:]
    #print(S,stack) len(S) > 0 len(S) len S 0 if len(stack) == 0:
        stack.append(S[0])
        S = S[1:]
    elif S[0] == stack[-1]:
        S = S[1:]
    
    elif S[0] != stack[-1]:
        stack.append(S[0])
        S = S[1:]
    #print(S,stack) len(stack) == 0 len(stack) len stack 0 stack.append(S[0]) stack.append stack append S[0] S 0 S = S[1:] S S[1:] S 1: 1 elif S[0] == stack[-1]:
        S = S[1:]
    
     S[0] == stack[-1] S[0] S 0 stack[-1] stack -1 S = S[1:] S S[1:] S 1: 1 elif S[0] != stack[-1]:
        stack.append(S[0])
        S = S[1:]
    #print(S,stack) S[0] != stack[-1] S[0] S 0 stack[-1] stack -1 stack.append(S[0]) stack.append stack append S[0] S 0 S = S[1:] S S[1:] S 1: 1 print(len(stack)) print len(stack) len stack stack = [] [] stack S = S[1:] S[1:] S S = S[1:] S[1:] S N = int(input()) int(input()) N S = S[1:] S[1:] S S = str(input()) str(input()) S
N = int(input())
S = str(input())
#print(N,S)

stack = []
while len(S) > 0:
    if len(stack) == 0:
        stack.append(S[0])
        S = S[1:]
    elif S[0] == stack[-1]:
        S = S[1:]
    
    elif S[0] != stack[-1]:
        stack.append(S[0])
        S = S[1:]
    #print(S,stack)
print(len(stack))
        
