def calculate():
    s = input()

    count = 0
    while s.count("01") > 0 or s.count("10"):
        if s.count("01") > 0:
            s = s.replace("01","",1)
            count += 1
        if s.count("10") > 0:
            s = s.replace("10", "",1)
            count += 1

    print(count*2)



calculate()