S = input()
num_length = len(S)
counter_0 = 0
counter_1 = 0
for i in range(num_length):
    if S[i] == 0:
        counter_0 += 1
    if S[i] == 1:
        counter_1 += 1

if counter_0 <= counter_1:
    print(2*counter_0)
else:
    print(2*counter_1)