program prob3
    implicit none
    character(100005) :: s
    integer :: a, b, i, N
    read(*,*) s
    N = len_trim(s)
    a = 0
    b = 0
    do i = 1, N
        if(s(i:i) == '1')then
            a = a + 1
        else
            b = b + 1
        end if
    end do

    write(*,*) 2*min(a, b)
    stop
contains
end program prob3