# デバッグ用

GBN_DEBUG = False

GBN_DEBUG = True

def dprn(s, i):

    if GBN_DEBUG: print(", " + s + " = " + str(i), end = "")

def dprns(s):

    if GBN_DEBUG: print(", " + s, end = "")

def dprni(i):

    if GBN_DEBUG: print(i, end=" ")

def endl(): 

    if GBN_DEBUG: print('')

def puts(s): print(s)



#本体ここから



S = input()

#N = int(input())

#S, T = input().split()

#N, M = map(int, input().split())

#W = [input() for _ in range(N)]

#A = A = list(map(int, input().split()))



slen = len(S)

zero = 0

one = 0

for i in range(slen):

    if S[i] == '0':

        zero += 1

    else:

        one += 1

if (zero > one):

    print(one * 2)

else:

    print(zero * 2)

# デバッグ用

GBN_DEBUG = False

GBN_DEBUG = True

def dprn(s, i):

    if GBN_DEBUG: print(", " + s + " = " + str(i), end = "")

def dprns(s):

    if GBN_DEBUG: print(", " + s, end = "")

def dprni(i):

    if GBN_DEBUG: print(i, end=" ")

def endl(): 

    if GBN_DEBUG: print('')

def puts(s): print(s)



#本体ここから



S = input()

#N = int(input())

#S, T = input().split()

#N, M = map(int, input().split())

#W = [input() for _ in range(N)]

#A = list(map(int, input().split()))



zero = S.count('0')

one = S.count('1')



ans = min(zero, one) * 2

print(ans)

# デバッグ用
GBN_DEBUG = False
GBN_DEBUG = True


def dprn(s, i):
    if GBN_DEBUG:
        print(", " + s + " = " + str(i), end="")


def dprns(s):
    if GBN_DEBUG:
        print(", " + s, end="")


def dprni(i):
    if GBN_DEBUG:
        print(i, end=" ")


def endl():
    if GBN_DEBUG:
        print("")


def puts(s):
    print(s)


# 本体ここから
S = input()
# N = int(input())
# S, T = input().split()
# N, M = map(int, input().split())
# W = [input() for _ in range(N)]
# A = A = list(map(int, input().split()))
slen = len(S)
zero = 0
one = 0
for i in range(slen):
    if S[i] == "0":
        zero += 1
    else:
        one += 1
if zero > one:
    print(one * 2)
else:
    print(zero * 2)

# デバッグ用
GBN_DEBUG = False
GBN_DEBUG = True


def dprn(s, i):
    if GBN_DEBUG:
        print(", " + s + " = " + str(i), end="")


def dprns(s):
    if GBN_DEBUG:
        print(", " + s, end="")


def dprni(i):
    if GBN_DEBUG:
        print(i, end=" ")


def endl():
    if GBN_DEBUG:
        print("")


def puts(s):
    print(s)


# 本体ここから
S = input()
# N = int(input())
# S, T = input().split()
# N, M = map(int, input().split())
# W = [input() for _ in range(N)]
# A = list(map(int, input().split()))
zero = S.count("0")
one = S.count("1")
ans = min(zero, one) * 2
print(ans)

-# A = A = list(map(int, input().split())) -slen = len(S) -zero = 0 -one = 0 -for i in range(slen): -    if S[i] == "0": -        zero += 1 -    else: -        one += 1 -if zero > one: -    print(one * 2) -else: -    print(zero * 2) +# A = list(map(int, input().split())) +zero = S.count("0") +one = S.count("1") +ans = min(zero, one) * 2 +print(ans)