
s = input()

n = len(s)

check = [False]*n


rem = 0

# 0 search
for i in range(n):
    if s[i]== '1':
        continue


    # 1 search
    for j in range(n):
        if s[j] == '0':
            continue

        if check[j]:
            continue

        check[i], check[j] = True, True
        rem += 2
        break

print(rem)

        
