S = raw_input()
count = 0
flag = True
while(flag):
    if '01' in S:
        S = S.replace('01','',1)
        count += 2                                                                                                  
    elif '10' in S:
        S = S.replace('10','',1)
        count += 2
    else:
        flag = False
print count
