The optimal mix of flexibility from an integrated energy system