program answer
  implicit none
  integer :: i, j, N, ans, count
  character(len=10**5) :: S
  read(*,*) S
  N=len_trim(S)
  ans=0
  count=0
  do i = 1, N
     if(S(i:i)=='1') then
        count=count+1
     end if
  end do
  ans=min(count,N-count)

  write(*,*) ans*2
  stop
 end program answer