s = gets.chomp.split("")
count = 0
del_flg = false

while 1
  s.each_with_index do |v,i|
    if (s[i]=="0" and s[i+1]=="1") or (s[i]=="1" and s[i+1]=="0")
      s.slice!(i, 2)
      count += 2
      del_flg = true
    end
  end

  if del_flg
    del_flg = false
  else
    break
  end

end

print count