program main
  implicit none
  character(len=100000) :: S
  integer :: n1,n0
  integer :: N,tmp
  integer :: i
  read(*,'(A)') S
  N=len(trim(S))
  n1 = 0
  do i = 1,N
     read(S(i:i),*) tmp
     if (tmp == 1) n1 =n1+1
  end do
  n0=N-n1
  if (n1==n0) then
     write(*,'(i0)') N
  else 
     write(*,'(i0)') min(n1,n0)*2
  end if
end program main
