def resolve():
    inp = input()

    c0 = inp.count('0')
    c1 = inp.count('1')

    print(min(c0, c1)*2)

resolve() def resolve():
    inp = input()

    c0 = inp.count('0')
    c1 = inp.count('1')

    print(min(c0, c1)*2) resolve inp = input() inp input() input c0 = inp.count('0') c0 inp.count('0') inp.count inp count '0' c1 = inp.count('1') c1 inp.count('1') inp.count inp count '1' print(min(c0, c1)*2) print min(c0, c1)*2 min(c0, c1) min c0 c1 2 resolve() resolve def resolve():
    inp = input()

    c0 = inp.count('0')
    c1 = inp.count('1')

    print(min(c0, c1)*2) def resolve():
    inp = input()

    c0 = inp.count('0')
    c1 = inp.count('1')

    print(min(c0, c1)*2) resolve
def resolve():
    inp = input()

    c0 = inp.count('0')
    c1 = inp.count('1')

    print(min(c0, c1)*2)

resolve()