s = input()
N = len(s)
s = list(map(int, sorted(s, reverse=True)))

ans = 0
left_edge = 0
a, b = 0, 1
while b < N:
    if (s[a] == 0 and s[b] == 1) or (s[a] == 1 and s[b] == 0):
        ans += 2
        if a == left_edge:
            a += 2
            b += 2
            left_edge += 2
        else:
            a -= 1
            b += 1
    else:
        a += 1
        b += 1
print(ans)
