def resolve():
    S = input()
    s0 = S.count("0")
    s1 = S.count("1")
    print(min(s0, s1) * 2)


resolve() def resolve():
    S = input()
    s0 = S.count("0")
    s1 = S.count("1")
    print(min(s0, s1) * 2) resolve S = input() S input() input s0 = S.count("0") s0 S.count("0") S.count S count "0" s1 = S.count("1") s1 S.count("1") S.count S count "1" print(min(s0, s1) * 2) print min(s0, s1) * 2 min(s0, s1) min s0 s1 2 resolve() resolve def resolve():
    S = input()
    s0 = S.count("0")
    s1 = S.count("1")
    print(min(s0, s1) * 2) def resolve():
    S = input()
    s0 = S.count("0")
    s1 = S.count("1")
    print(min(s0, s1) * 2) resolve
def resolve():
    S = input()
    s0 = S.count("0")
    s1 = S.count("1")
    print(min(s0, s1) * 2)


resolve()
