# ABC120C

s = input()
s = list(s)
count = 0
while len(s) > 1:
    found = False
    for i in range(len(s)-1):
        if (s[i] == '1' and s[i+1] == '0') or (s[i] == '0' and s[i+1] == '1'):
            #print(f"s = {s}, i, i+1, {i}, {i+1}")
            s.pop(i+1)
            s.pop(i)
            found = True
            count += 2
            break
    if found == False:
        break
print(count)
