s = input()
zero = 0
one = 0

for i in s:
    if i == "0":
        zero += 1
    else:
        one += 1
        
res = min(zero, one) * 2
print(res)  s = input() s input() input zero = 0 zero 0 one = 0 one 0 for i in s:
    if i == "0":
        zero += 1
    else:
        one += 1
         i s if i == "0":
        zero += 1
    else:
        one += 1
         i == "0" i "0" zero += 1 zero 1 one += 1 one 1 res = min(zero, one) * 2 res min(zero, one) * 2 min(zero, one) min zero one 2 print(res) print res s = input() input() s zero += 1 1 zero zero = 0 0 zero one = 0 0 one one += 1 1 one res = min(zero, one) * 2 min(zero, one) * 2 res
s = input()
zero = 0
one = 0

for i in s:
    if i == "0":
        zero += 1
    else:
        one += 1
        
res = min(zero, one) * 2
print(res) 