PROGRAM ATCODER

implicit none
character(len=100000) :: s
integer :: i, count0, count1

read(*,*) s

count0 = 0
count1 = 0
do i = 1, len_trim(s)
	if(s(i:i) == '0')then
    	count0 = count0 + 1
    end if
    if(s(i:i) == '1')then
    	count1 = count1 + 1
    end if
end do

write(*,'(I0)') 2*min(count0, count1)

END PROGRAM ATCODER