def resolve():
    s = input()
    num_0 = s.count("0")
    num_1 = s.count("1")
    print(min(num_0, num_1)*2)
resolve() def resolve():
    s = input()
    num_0 = s.count("0")
    num_1 = s.count("1")
    print(min(num_0, num_1)*2) resolve s = input() s input() input num_0 = s.count("0") num_0 s.count("0") s.count s count "0" num_1 = s.count("1") num_1 s.count("1") s.count s count "1" print(min(num_0, num_1)*2) print min(num_0, num_1)*2 min(num_0, num_1) min num_0 num_1 2 resolve() resolve def resolve():
    s = input()
    num_0 = s.count("0")
    num_1 = s.count("1")
    print(min(num_0, num_1)*2) def resolve():
    s = input()
    num_0 = s.count("0")
    num_1 = s.count("1")
    print(min(num_0, num_1)*2) resolve
def resolve():
    s = input()
    num_0 = s.count("0")
    num_1 = s.count("1")
    print(min(num_0, num_1)*2)
resolve()