S = input()

N = len(S)
l = [int(x) for x in list(str(S))]

count = 0
idx = 0
len_S = 0

while True:
    if len(l) == 1:
        break
    if l[idx] == 0 and l[idx+1] == 1:
        l.pop(idx)
        l.pop(idx)
        count += 2
        idx = 0
        if len(l) == 0:
            break
        continue
    elif l[idx] == 1 and l[idx+1] == 0:
        l.pop(idx)
        l.pop(idx)
        count += 2
        idx = 0
        if len(l) == 0:
            break
        continue
    if idx+1 == len(l)-1:
        break
    idx += 1

print(count)