import collections


def resolve():
    S = input()
    counter_S = collections.Counter(S)

    appear_0 = counter_S['0']
    appear_1 = counter_S['1']

    ans = min(appear_0, appear_1) * 2
    print(ans)


resolve() import collections collections def resolve():
    S = input()
    counter_S = collections.Counter(S)

    appear_0 = counter_S['0']
    appear_1 = counter_S['1']

    ans = min(appear_0, appear_1) * 2
    print(ans) resolve S = input() S input() input counter_S = collections.Counter(S) counter_S collections.Counter(S) collections.Counter collections Counter S appear_0 = counter_S['0'] appear_0 counter_S['0'] counter_S '0' appear_1 = counter_S['1'] appear_1 counter_S['1'] counter_S '1' ans = min(appear_0, appear_1) * 2 ans min(appear_0, appear_1) * 2 min(appear_0, appear_1) min appear_0 appear_1 2 print(ans) print ans resolve() resolve def resolve():
    S = input()
    counter_S = collections.Counter(S)

    appear_0 = counter_S['0']
    appear_1 = counter_S['1']

    ans = min(appear_0, appear_1) * 2
    print(ans) def resolve():
    S = input()
    counter_S = collections.Counter(S)

    appear_0 = counter_S['0']
    appear_1 = counter_S['1']

    ans = min(appear_0, appear_1) * 2
    print(ans) resolve
import collections


def resolve():
    S = input()
    counter_S = collections.Counter(S)

    appear_0 = counter_S['0']
    appear_1 = counter_S['1']

    ans = min(appear_0, appear_1) * 2
    print(ans)


resolve()