s = input()
cnt = 0
while True:
    state = False
    if len(s) == 0:
        break
    li = []
    for i in s:
        li.append(i)
    for i in range(len(li)-1):
        if li[i] == "0" and li[i+1] == "1":
            li[i] = ""
            li[i+1] = ""
            cnt+=1
            state = True
        elif li[i] == "1" and li[i+1] == "0":
            li[i] = ""
            li[i+1] = ""
            cnt+=1
            state = True
    s = ""
    for i in range(len(li)):
        s += li[i]
    if state == False:
        break
print(cnt*2)
    