6 (source code)

= 6
{scope}

The official Oxford course archive advertises https://courses.maths.ox.ac.uk/course/view.php?id=4047[an answer for this entire question]. Its introductory ask and all seven leaves are covered externally and are not re-solved here.