s = list(input())
pattern = [['0', '1'], ['1', '0']]
count = 0
while len(s) > 1:
    founds = False
    for x in pattern:
        found = False
        for i in range(1, len(s)):
            if [s[i-1], s[i]] == x:
                found = True
                s = s[:i-1]+s[i+1:] if i >= 1 else s[i+1:]
                count = count + 2
                break
        if found:
            founds = True
            break
    if not founds: break
print(count)