# coding: utf-8
# Your code here!

counter = 0

string = input()

while (string.find("01") != -1 ) :
    string = (string.replace("01", "", 1))
    counter += 2

while (string.find("10") != -1 ) :
    string = (string.replace("10", "", 1))
    counter += 2
    
print(counter)