An extended sentence of detention under this section is a sentence of detention the term of which is equal to the aggregate of—
the appropriate custodial term (see section 256), and
a further period (the “extension period”) for which the offender is to be subject to a licence.