S = eval(input())





count_1 = 0

count_0 = 0



for i in range(len(S)):

  if S[i]=="1":

    count_1 = count_1 + 1

  elif S[i]=="0":

    count_0 = count_0 + 1

    



if count_1 >= count_0:

  print((count_0*2))

else:

  print((count_1*2))



S = list(eval(input()))



zero = S.count("0")

one  = S.count("1")



print((int(zero*2) if zero <= one else int(one*2)))
S = eval(input())
count_1 = 0
count_0 = 0
for i in range(len(S)):
    if S[i] == "1":
        count_1 = count_1 + 1
    elif S[i] == "0":
        count_0 = count_0 + 1
if count_1 >= count_0:
    print((count_0 * 2))
else:
    print((count_1 * 2))

S = list(eval(input()))
zero = S.count("0")
one = S.count("1")
print((int(zero * 2) if zero <= one else int(one * 2)))

-S = eval(input()) -count_1 = 0 -count_0 = 0 -for i in range(len(S)): -    if S[i] == "1": -        count_1 = count_1 + 1 -    elif S[i] == "0": -        count_0 = count_0 + 1 -if count_1 >= count_0: -    print((count_0 * 2)) -else: -    print((count_1 * 2)) +S = list(eval(input())) +zero = S.count("0") +one = S.count("1") +print((int(zero * 2) if zero <= one else int(one * 2)))