S=io.read()
s={}
for i=1,#S do
    s[i]=tonumber(string.sub(S,i,i))
end
local count=0
local i=#s
while i~=1  do
    if s[i]==0 and s[i-1]==1 or s[i]==1 and s[i-1]==0 then
        table.remove(s,i)
        table.remove(s,i-1)
        count=count+2
        i=i+1
    else
        i=i-1
    end
end
print(count)
        