def sakuzyo(li):
    ct = 0
    found = 1
    while found:
        found = 0
        for i in range(len(li)-1):
            if (li[i] == "0" and li[i+1] == "1") or (li[i] == "1" and li[i+1] == "0"):
                li.pop(i)
                li.pop(i)
                ct += 2
                found = 1
                break
    return ct
li = list(input())
print(sakuzyo(li))

