program A322B
    implicit none
    integer(8)::N,i,ocount,zcount
    character(1000000)::S
    read*,S
    ocount=0
    zcount=0
    N=len_trim(S)

    do i=1,N
        if(S(i:i)=="0")ocount=ocount+1
        if(S(i:i)=="1")zcount=zcount+1
    end do

    print'(i0)',2*min(ocount,zcount)
end program A322B