program cube
 implicit none
 character(100000) :: s
 integer n, i, red, blue
 read *, s
 red = 0
 blue = 0
 n = len_trim(s)
 do i = 1,n
   if (s(i:i) == "0") then
     red = red + 1
  else
    blue = blue + 1
  end if
 end do
 print '(i0)', n-abs(red-blue)
 stop
end program cube