program main
	implicit none
	character(100010) :: S
	integer :: counter_0, counter_1, i
	read(*, *) S
	counter_0 = 0
	counter_1 = 0
	do i = 1, len_trim(S)
		if(S(i:i) == '0') then
			counter_0 = counter_0 + 1
		else
			counter_1 = counter_1 + 1
		end if
	end do
	write(*, *) min(counter_0, counter_1)*2
end program main