s = list(input())

def check_pair(array):
    if len(array) < 2:
        return False
    for i, a in enumerate(array[:-1]):
        if (a=='0' and array[i+1]=='1') or (a=='1' and array[i+1]=='0'):
            del array[i:i+2]
            return array
    return False

ans = 0
while True:
    s = check_pair(s)
    if s == False:
        break
    else:
        ans += 1

print(ans*2)