program prob3
    implicit none
    character(len=100005)::S
    integer::n, i, j, cnt
    read(*,*) S
    cnt = 0
    n = len_trim(S)
    do i = 1, N
        if(S(i:i) .eq. "0") cnt = cnt + 1
    end do
    write(*,*) 2*min(n-cnt,cnt)
    stop
end program