st = input()
list_s = []
for s in st:
    list_s.append(s)

delcount = 0
while True:
    if len(list_s) < 2:
        break
    pre = list_s[0]
    count = 0
    for s in list_s:        
        if (pre == '0' and s == '1') or (pre == '1' and s == '0'):
            del list_s[count]
            del list_s[count-1]
            delcount += 1
            break
        count += 1
    if list_s.count('0') == 0 or list_s.count('1') == 0:
        break
print(delcount * 2)
