# -*- coding: utf-8 -*-



S = eval(input())



l0, l1 = 0, 0

for s in S:

    if s == '0':

        l0 += 1

    elif s == '1':

        l1 += 1



print((min(l0, l1) * 2))

# -*- coding: utf-8 -*-



S = eval(input())

print((min(S.count('1'), S.count('0')) * 2))

# -*- coding: utf-8 -*-
S = eval(input())
l0, l1 = 0, 0
for s in S:
    if s == "0":
        l0 += 1
    elif s == "1":
        l1 += 1
print((min(l0, l1) * 2))

# -*- coding: utf-8 -*-
S = eval(input())
print((min(S.count("1"), S.count("0")) * 2))

-l0, l1 = 0, 0 -for s in S: -    if s == "0": -        l0 += 1 -    elif s == "1": -        l1 += 1 -print((min(l0, l1) * 2)) +print((min(S.count("1"), S.count("0")) * 2))