S = list(input())
rm = 0
while True:
    length = len(S)
    for i in range(length - 1):
        # print(S)
        # print(f"1){length} {i} {len(S)}")
        if (int(S[i]) + int(S[i+1])) == 1:
            rm += 2
            del(S[i:i+2])
            # print(f"2){length} {i} {len(S)} {S}")
            break
        else:
            i += 1
    # print(f"3){length} {i} {len(S)}")
    if length == len(S):
        break
    i = 0
print(rm)