def main():

  msg=list(eval(input()))

  a,b=0,0

  for _ in msg:

    if _ == "0":

      a+=1

    else:

      b+=1

  ans=2*min(a,b)

  print(ans)    

main()
def main():

  msg=list(eval(input()))

  a=msg.count("1")

  b=len(msg)-a

  print((2*min(a,b)))

main()
def main():
    msg = list(eval(input()))
    a, b = 0, 0
    for _ in msg:
        if _ == "0":
            a += 1
        else:
            b += 1
    ans = 2 * min(a, b)
    print(ans)


main()

def main():
    msg = list(eval(input()))
    a = msg.count("1")
    b = len(msg) - a
    print((2 * min(a, b)))


main()

-    a, b = 0, 0 -    for _ in msg: -        if _ == "0": -            a += 1 -        else: -            b += 1 -    ans = 2 * min(a, b) -    print(ans) +    a = msg.count("1") +    b = len(msg) - a +    print((2 * min(a, b)))