program main
  implicit none
  integer :: n, i, m
  character(100000) :: s
  read (*, *) s
  n = len(trim(s))
  m = 0
  do i = 1, n
    if (s(i:i) == "0") m = m + 1
  end do

  write(*, "(i0)") min(m, n - m) * 2
end program main
