s = input()
s = list(s)
idx = 0
blocks = 0
while idx != len(s) - 1:
    if s[idx] == '0' and s[idx+1] == '1':

        tmp1 = s[idx]
        tmp2 = s[idx+1]

        s.remove(tmp1)
        s.remove(tmp2)

        idx = 0
        blocks += 2

    elif s[idx] == '1' and s[idx+1] == '0':

        tmp1 = s[idx]
        tmp2 = s[idx+1]

        s.remove(tmp1)
        s.remove(tmp2)

        idx = 0
        blocks += 2

    else:
        idx += 1
        
    if len(s) == 0:
        break

print(blocks)
