import sys
import itertools
from collections import deque
from operator import itemgetter

input = sys.stdin.readline
S = input()
counter = 0

for i in range(len(S)):
    null = 0
    if '01' in S:
        S = S.replace('01', '', 1)
        counter += 1
    else:
        null +=1
    if '10' in S:
        S = S.replace('10','', 1)
        counter += 1
    else:
        null += 1
    if null == 2:
        break
print(2*counter)