s = input()
count = 0
for i in range(len(s)):
    if '10' in s:
        s = s.replace('10', '', 1)
        count += 1
    elif '01' in s:
        s = s.replace('01', '', 1)
        count += 1
    else:
        pass

print(count * 2)