local zeroes, ones = 0, 0
while true do
    local c = io.read(1)
    if c == '0' then
        zeroes = zeroes + 1
    elseif c == '1' then
        ones = ones + 1
    elseif c == '\n' then
        break
    end
end
print(math.min(zeroes, ones) * 2)