S=gets.chomp

c0 = 0
c1 = 0
ret = 0
S.each_char do |c|
    if c == '1'
        if 0 < c0
            ret += 2
            c0 -= 1
        else
            c1 += 1
        end
    else
        if 0 < c1
            ret += 2
            c1 -= 1
        else
            c0 += 1
        end
    end
end
puts ret