s = input()

aux = 0

while '01' in s or '10' in s:
    if '01' in s:
        s = s.replace('01', '', 1)
        aux += 2
    if '10' in s:
        s = s.replace('10', '', 1)
        aux += 2

print(aux)
