S = eval(input())

zero, one = 0, 0

for i in range(len(S)):

    if S[i] == "0": zero += 1

    else: one += 1

print((min(zero, one)*2))
import sys



def solve():

    input = sys.stdin.readline

    zero, one = 0, 0

    s = input().strip("\n")

    for i in range(len(s)):

        if s[i] == "0": zero += 1

        else: one += 1

    print((2 * min(zero, one)))



    return 0



if __name__ == "__main__":

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

import sys


def solve():
    input = sys.stdin.readline
    zero, one = 0, 0
    s = input().strip("\n")
    for i in range(len(s)):
        if s[i] == "0":
            zero += 1
        else:
            one += 1
    print((2 * min(zero, one)))
    return 0


if __name__ == "__main__":
    solve()

-S = eval(input()) -zero, one = 0, 0 -for i in range(len(S)): -    if S[i] == "0": -        zero += 1 -    else: -        one += 1 -print((min(zero, one) * 2)) +import sys + + +def solve(): +    input = sys.stdin.readline +    zero, one = 0, 0 +    s = input().strip("\n") +    for i in range(len(s)): +        if s[i] == "0": +            zero += 1 +        else: +            one += 1 +    print((2 * min(zero, one))) +    return 0 + + +if __name__ == "__main__": +    solve()