program unification
  implicit none
  character(100000) :: s
  integer :: n, i, m = 0
  read(*,*) s
  n = len_trim(s)
  do i = 1, n
    m = m+ichar(s(i:i))-48
  end do
  write(*,'(i0)') 2*min(m,n-m)
end program unification