s = input()

ans = 0
ind = 0
while ind < len(s)-1:
    if s[ind:ind+2] in ("01", "10"):
        s = s[:ind]+s[ind+2:]
        ans += 1
        ind = max(0, ind-1)

    else:
        ind += 1
print(ans*2) s = input() s input() input ans = 0 ans 0 ind = 0 ind 0 while ind < len(s)-1:
    if s[ind:ind+2] in ("01", "10"):
        s = s[:ind]+s[ind+2:]
        ans += 1
        ind = max(0, ind-1)

    else:
        ind += 1 ind < len(s)-1 ind len(s)-1 len(s) len s 1 if s[ind:ind+2] in ("01", "10"):
        s = s[:ind]+s[ind+2:]
        ans += 1
        ind = max(0, ind-1)

    else:
        ind += 1 s[ind:ind+2] in ("01", "10") s[ind:ind+2] s ind:ind+2 ind ind+2 ind 2 ("01", "10") "01" "10" s = s[:ind]+s[ind+2:] s s[:ind]+s[ind+2:] s[:ind] s :ind ind s[ind+2:] s ind+2: ind+2 ind 2 ans += 1 ans 1 ind = max(0, ind-1) ind max(0, ind-1) max 0 ind-1 ind 1 ind += 1 ind 1 print(ans*2) print ans*2 ans 2 ind += 1 1 ind s = input() input() s s = s[:ind]+s[ind+2:] s[:ind]+s[ind+2:] s ans += 1 1 ans ans = 0 0 ans ind = max(0, ind-1) max(0, ind-1) ind ind = 0 0 ind
s = input()

ans = 0
ind = 0
while ind < len(s)-1:
    if s[ind:ind+2] in ("01", "10"):
        s = s[:ind]+s[ind+2:]
        ans += 1
        ind = max(0, ind-1)

    else:
        ind += 1
print(ans*2)
