s = str(input())
count0= 0
count1 = 0
for i in range(len(list(s))):
    if s[i] == '0':
        count0 += 1
    else:
        count1 += 1
if count0 > count1:
    print(count0*2)
elif count0 == count1:
    print(count1 + count0)
else:
    print(count1*2)