data = input()
score = 0
size = len(data)

def get_score(data):
    global score
    for i in range(0, size-1):
        ab = data[i:i+2]

        if ab == '10' or ab =='01':
            score += 2
            data = data[:i] + data[i+2:]
            break

    if data == '' or set(data) == {'1'} or set(data) == {'0'}:
        return
    get_score(data)

get_score(data)
print(score)