S = input()
N = len(S)

counter = 0
i = 0
while(True):
    if not '0' in S or not '1' in S or S == '':
        break
    if S[i:i+2] == '01' or S[i:i+2] == '10':
        S_list = list(S)
        S_list.pop(i)
        S_list.pop(i)
        S_str = ''
        for j in S_list:
            S_str += j
        S = S_str
        counter += 2
        i -= 1
    else:
        i += 1

print(counter)
