#C

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

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