s = input()

cnt = 0

while '01' in s or '10' in s:
    if '01' in s:
        s = s.replace('01','', 1)
        cnt += 1
        continue
    if '10' in s:
        s = s.replace('10','', 1)
        cnt += 1
        continue

print(cnt*2)
