S = input()
ans = 0
i = 0
while i < len(S)-1:
    if S[i] != S[i+1]:
        ans += 2
        if i==0:
            S = S[2:]
        else:
            S = S[:i] + S[i+2:]
            i -= 1
    else:
        i += 1
print(ans) S = input() S input() input ans = 0 ans 0 i = 0 i 0 while i < len(S)-1:
    if S[i] != S[i+1]:
        ans += 2
        if i==0:
            S = S[2:]
        else:
            S = S[:i] + S[i+2:]
            i -= 1
    else:
        i += 1 i < len(S)-1 i len(S)-1 len(S) len S 1 if S[i] != S[i+1]:
        ans += 2
        if i==0:
            S = S[2:]
        else:
            S = S[:i] + S[i+2:]
            i -= 1
    else:
        i += 1 S[i] != S[i+1] S[i] S i S[i+1] S i+1 i 1 ans += 2 ans 2 if i==0:
            S = S[2:]
        else:
            S = S[:i] + S[i+2:]
            i -= 1
     i==0 i 0 S = S[2:] S S[2:] S 2: 2 S = S[:i] + S[i+2:] S S[:i] + S[i+2:] S[:i] S :i i S[i+2:] S i+2: i+2 i 2 i -= 1 i 1 i += 1 i 1 print(ans) print ans S = S[:i] + S[i+2:] S[:i] + S[i+2:] S ans += 2 2 ans S = input() input() S i = 0 0 i i -= 1 1 i i += 1 1 i ans = 0 0 ans S = S[2:] S[2:] S
S = input()
ans = 0
i = 0
while i < len(S)-1:
    if S[i] != S[i+1]:
        ans += 2
        if i==0:
            S = S[2:]
        else:
            S = S[:i] + S[i+2:]
            i -= 1
    else:
        i += 1
print(ans)
