program ccc
implicit none

character(10**5+1) :: s
integer :: l, zero, one, i

read*, s
l=len_trim(s)

zero=0
one=0
do i=1,l
if(s(i:i)=='0') then
zero=zero+1
else
one=one+1
end if
end do

write(*,'(i0)') int(min(zero,one)/2)*4

end program