def resolve():
    s = input()
    one = 0
    zero = 0
    for i in range(len(s)):
        if s[i] =="0":
            zero += 1
        else:
            one += 1
    print(2*min(zero, one))

resolve() def resolve():
    s = input()
    one = 0
    zero = 0
    for i in range(len(s)):
        if s[i] =="0":
            zero += 1
        else:
            one += 1
    print(2*min(zero, one)) resolve s = input() s input() input one = 0 one 0 zero = 0 zero 0 for i in range(len(s)):
        if s[i] =="0":
            zero += 1
        else:
            one += 1
     i range(len(s)) range len(s) len s if s[i] =="0":
            zero += 1
        else:
            one += 1
     s[i] =="0" s[i] s i "0" zero += 1 zero 1 one += 1 one 1 print(2*min(zero, one)) print 2*min(zero, one) 2 min(zero, one) min zero one resolve() resolve def resolve():
    s = input()
    one = 0
    zero = 0
    for i in range(len(s)):
        if s[i] =="0":
            zero += 1
        else:
            one += 1
    print(2*min(zero, one)) def resolve():
    s = input()
    one = 0
    zero = 0
    for i in range(len(s)):
        if s[i] =="0":
            zero += 1
        else:
            one += 1
    print(2*min(zero, one)) resolve
def resolve():
    s = input()
    one = 0
    zero = 0
    for i in range(len(s)):
        if s[i] =="0":
            zero += 1
        else:
            one += 1
    print(2*min(zero, one))

resolve()