s = input()

aux = 0
stop = True
while stop:
    if '01' in s:
        s = s.replace('01', '', 1)
        aux += 2
    elif '10' in s:
        s = s.replace('10', '', 1)
        aux += 2
    else:
        stop = False

print(aux)

